more regex test down to libraries/base
SRC_HC_OPTS += -fglasgow-exts -cpp -Iinclude -"\#include" HsBase.h
SRC_HSC2HS_OPTS += -Iinclude -I$(FPTOOLS_TOP)/ghc/includes
SRC_HC_OPTS += -fglasgow-exts -cpp -Iinclude -"\#include" HsBase.h
SRC_HSC2HS_OPTS += -Iinclude -I$(FPTOOLS_TOP)/ghc/includes
-# If there is no system-supplied POSIX regex library, use our own
-ifneq "$(HavePosixRegex)" "YES"
-# Make sure we can get hold of regex.h
-SRC_HC_OPTS += -Icbits/regex
-SRC_HSC2HS_OPTS += -Icbits/regex
-endif
-
# -----------------------------------------------------------------------------
# Per-module flags
# -----------------------------------------------------------------------------
# Per-module flags
-- ToDo: should have an interface using PackedStrings.
#ifndef __NHC__
-- ToDo: should have an interface using PackedStrings.
#ifndef __NHC__
+#include "HsBaseConfig.h"
#else
#define HAVE_REGEX_H 1
#define HAVE_REGCOMP 1
#else
#define HAVE_REGEX_H 1
#define HAVE_REGCOMP 1
-# $Id: Makefile,v 1.13 2004/11/10 11:27:54 simonmar Exp $
+# $Id: Makefile,v 1.14 2005/02/01 00:52:22 ross Exp $
TOP = ../..
include $(TOP)/mk/boilerplate.mk
TOP = ../..
include $(TOP)/mk/boilerplate.mk
--- /dev/null
+# Regex library
+# (if present in libc use that one, otherwise use the one in the tree)
+#
+HavePosixRegex = @HavePosixRegex@
# rlim_t, because it will affect the result of that test.
AC_SYS_LARGEFILE
# rlim_t, because it will affect the result of that test.
AC_SYS_LARGEFILE
+dnl ** check for POSIX regex
+HavePosixRegex=NO
+AC_CHECK_HEADERS([regex.h], [AC_CHECK_FUNCS(regcomp, [HavePosixRegex=YES])])
+AC_SUBST(HavePosixRegex)
+
dnl ** check for wide-char classifications
dnl FreeBSD has an emtpy wctype.h, so test one of the affected
dnl functions if it's really there.
dnl ** check for wide-char classifications
dnl FreeBSD has an emtpy wctype.h, so test one of the affected
dnl functions if it's really there.
esac
AC_SUBST([EXTRA_LIBS])
esac
AC_SUBST([EXTRA_LIBS])
-AC_CONFIG_FILES([base.buildinfo])
+AC_CONFIG_FILES([config.mk base.buildinfo])
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.4 2004/10/05 07:43:07 mthomas Exp $
+# $Id: Makefile,v 1.5 2005/02/01 00:52:22 ross Exp $
TOP=../..
include $(TOP)/mk/boilerplate.mk
TOP=../..
include $(TOP)/mk/boilerplate.mk
H_FILES = $(wildcard *.h)
H_FILES = $(wildcard *.h)