[project @ 2002-02-13 11:51:40 by simonmar]
authorsimonmar <unknown>
Wed, 13 Feb 2002 11:51:40 +0000 (11:51 +0000)
committersimonmar <unknown>
Wed, 13 Feb 2002 11:51:40 +0000 (11:51 +0000)
- 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.

aclocal.m4
configure.in
mk/config.mk.in

index f5485cc..7dc2e4d 100644 (file)
@@ -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)
 ])
 
 
index e030223..b8bc441 100644 (file)
@@ -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
 
index a4f8f70..3dc1f9e 100644 (file)
@@ -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+