* configure.in (AC_CHECK_HEADERS): Test for rxposix.h,
authorMikael Djurfeldt <djurfeldt@nada.kth.se>
Sun, 24 Aug 1997 15:35:08 +0000 (15:35 +0000)
committerMikael Djurfeldt <djurfeldt@nada.kth.se>
Sun, 24 Aug 1997 15:35:08 +0000 (15:35 +0000)
rx/rxposix.h.  Add library rx only if regcomp can't be found
without it.

* acconfig.h (HAVE_REGCOMP): Added it here since autoheader misses
it for some reason!

ChangeLog
acconfig.h
configure.in

index 53157ce..c8275dc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Sun Aug 24 15:51:12 1997  Mikael Djurfeldt  <mdj@kenneth>
+
+       * configure.in (AC_CHECK_HEADERS): Test for rxposix.h,
+       rx/rxposix.h.  Add library rx only if regcomp can't be found
+       without it.
+
+       * acconfig.h (HAVE_REGCOMP): Added it here since autoheader misses
+       it for some reason!
+
 Fri Aug 22 21:21:49 1997  Jim Blandy  <jimb@totoro.red-bean.com>
 
        * THANKS: New file.
index cfde7b0..2b9f71b 100644 (file)
@@ -74,3 +74,6 @@
 
 /* Define if the system supports Unix-domain (file-domain) sockets.  */
 #undef HAVE_UNIX_DOMAIN_SOCKETS
+
+/* This is included as part of a workaround for a autoheader bug. */
+#undef HAVE_REGCOMP
index e3216a4..1c8e8bb 100644 (file)
@@ -45,7 +45,7 @@ AC_HEADER_STDC
 AC_HEADER_DIRENT
 AC_HEADER_TIME
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(libc.h limits.h malloc.h memory.h string.h regex.h sys/ioctl.h sys/select.h sys/time.h sys/timeb.h sys/times.h sys/types.h sys/utime.h time.h unistd.h utime.h)
+AC_CHECK_HEADERS(libc.h limits.h malloc.h memory.h string.h regex.h rxposix.h rx/rxposix.h sys/ioctl.h sys/select.h sys/time.h sys/timeb.h sys/times.h sys/types.h sys/utime.h time.h unistd.h utime.h)
 GUILE_HEADER_LIBC_WITH_UNISTD
 
 AC_TYPE_GETGROUPS
@@ -53,7 +53,6 @@ AC_TYPE_SIGNAL
 AC_TYPE_MODE_T
 
 AC_CHECK_LIB(m, main)
-AC_CHECK_LIB(rx, main)
 AC_CHECK_FUNC(gethostbyname)
 if test $ac_cv_func_gethostbyname = no; then
     AC_CHECK_LIB(nsl, gethostbyname)
@@ -137,8 +136,21 @@ if test $scm_cv_restarts = yes; then
        AC_DEFINE(HAVE_RESTARTS)
 fi
 
-if test "$ac_cv_header_regex_h" = yes; then
-  AC_CHECK_FUNCS(regcomp, [LIBOBJS="regex-posix.o $LIBOBJS"])
+if test "$ac_cv_header_regex_h" = yes ||
+   test "$ac_cv_header_rxposix_h" = yes ||
+   test "$ac_cv_header_rx_rxposix_h" = yes; then
+  unset ac_cv_func_regcomp
+  AC_CHECK_FUNC(regcomp, [LIBOBJS="regex-posix.o $LIBOBJS"])
+  if test "$ac_cv_func_regcomp" != yes; then
+    AC_CHECK_LIB(rx, main)
+    unset ac_cv_func_regcomp
+    AC_CHECK_FUNC(regcomp, [LIBOBJS="regex-posix.o $LIBOBJS"])
+  fi
+  dnl The following should not be necessary, but for some reason
+  dnl autoheader misses it if we don't include it!
+  if test "$ac_cv_func_regcomp" = yes; then
+    AC_DEFINE(HAVE_REGCOMP)
+  fi
 fi
 
 AC_REPLACE_FUNCS(inet_aton putenv strerror)