From: simonmar Date: Wed, 13 Feb 2002 11:51:40 +0000 (+0000) Subject: [project @ 2002-02-13 11:51:40 by simonmar] X-Git-Tag: Approximately_9120_patches~80 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=aa0db18377c0e702c6f47a993bc5ad6153a58770;hp=27e900651ecbf70bbc0015a57107762ef5fafc2c;p=ghc-hetmet.git [project @ 2002-02-13 11:51:40 by simonmar] - Detect presence of a POSIX-compatible regex interface in configure, and omit Text.Regex.Posix (and hence Text.Regex) if it is missing. ToDo: pull in a suitably-licensed implementation of POSIX regex to be used in the event that the system doesn't supply one. - Rename old HaveRegex to HaveGNURegex. --- diff --git a/aclocal.m4 b/aclocal.m4 index f5485cc..7dc2e4d 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -dnl $Id: aclocal.m4,v 1.93 2002/01/17 09:52:18 sof Exp $ +dnl $Id: aclocal.m4,v 1.94 2002/02/13 11:51:40 simonmar Exp $ dnl dnl Extra autoconf macros for the Glasgow fptools dnl @@ -86,11 +86,11 @@ AC_DEFUN(FPTOOLS_REGEX_IN_LIBC, re_search_2 (&patbuf, "", 0, "",0, 0,0,0,0); ], fptools_cv_have_regex=yes, fptools_cv_have_regex=no)]) if test "$fptools_cv_have_regex" = yes; then - HaveRegex=YES + HaveGNURegex=YES else - HaveRegex=NO + HaveGNURegex=NO fi -AC_SUBST(HaveRegex) +AC_SUBST(HaveGNURegex) ]) diff --git a/configure.in b/configure.in index e030223..b8bc441 100644 --- a/configure.in +++ b/configure.in @@ -699,6 +699,11 @@ AC_CHECK_HEADER(alloc.h,AC_CHECK_FUNCS(farcalloc)) dnl ** check for valloc (in sunos, solaris, mips, amiga, next, minix, ultrix) AC_CHECK_HEADER(malloc.h,AC_CHECK_FUNCS(valloc)) +dnl ** check for POSIX regex +HavePosixRegex=NO +AC_CHECK_HEADER(regex.h,AC_CHECK_FUNC(regcomp, HavePosixRegex=YES)) +AC_SUBST(HavePosixRegex) + dnl ** how do we get a timezone name, and UTC offset ? AC_STRUCT_TIMEZONE diff --git a/mk/config.mk.in b/mk/config.mk.in index a4f8f70..3dc1f9e 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -650,10 +650,11 @@ HaveLibGmp = @HaveLibGmp@ LibGmp = @LibGmp@ #----------------------------------------------------------------------------- -# Regex library +# Regex libraries # (if present in libc use that one, otherwise use the one in the tree) # -HaveRegex = @HaveRegex@ +HavePosixRegex = @HavePosixRegex@ +HaveGNURegex = @HaveGNURegex@ #----------------------------------------------------------------------------- # GTK+