Index: ChangeLog
from Akim Demaille <[EMAIL PROTECTED]>
* m4/regex.m4: Use AC_LIBSOURCES.
* automake.in (scan_autoconf_traces): Trace AC_LIBSOURCE, not
_AC_LIBOBJ_DECL.
Index: m4/regex.m4
--- m4/regex.m4 Sat, 13 Jan 2001 18:11:09 +0100 akim (am/f/10_regex.m4 1.1 644)
+++ m4/regex.m4 Thu, 01 Feb 2001 22:01:43 +0100 akim (am/f/10_regex.m4 1.1 644)
@@ -2,30 +2,39 @@
## Check if --with-regex was given. ##
## --------------------------------- ##
-# serial 1
-
-# The idea is to distribute rx.[hc] and regex.[hc] together, for a while.
-# The WITH_REGEX symbol (which should also be documented in acconfig.h)
-# is used to decide which of regex.h or rx.h should be included in the
-# application. If `./configure --with-regex' is given (the default), the
-# package will use gawk's regex. If `./configure --without-regex', a
-# check is made to see if rx is already installed, as with newer Linux'es.
-# If not found, the package will use the rx from the distribution.
-# If found, the package will use the system's rx which, on Linux at least,
-# will result in a smaller executable file.
+# serial 2
+# AM_WITH_REGEX
+# -------------
+#
+# The idea is to distribute rx.[hc] and regex.[hc] together, for a
+# while. The WITH_REGEX symbol is used to decide which of regex.h or
+# rx.h should be included in the application. If `./configure
+# --with-regex' is given (the default), the package will use gawk's
+# regex. If `./configure --without-regex', a check is made to see if
+# rx is already installed, as with newer Linux'es. If not found, the
+# package will use the rx from the distribution. If found, the
+# package will use the system's rx which, on Linux at least, will
+# result in a smaller executable file.
+#
+# FIXME: This macro seems quite obsolete now since rx doesn't seem to
+# be maintained, while regex is.
AC_DEFUN([AM_WITH_REGEX],
-[AC_MSG_CHECKING([which of GNU rx or gawk's regex is wanted])
+[ifdef([AC_LIBSOURCES],
+ [AC_LIBSOURCES([rx.h, rx.c, regex.c, regex.h])])dnl
+AC_MSG_CHECKING([which of GNU rx or gawk's regex is wanted])
AC_ARG_WITH(regex,
[ --without-regex use GNU rx in lieu of gawk's regex for matching],
-[test "$withval" = yes && am_with_regex=1],
-[am_with_regex=1])
+ [test "$withval" = yes && am_with_regex=1],
+ [am_with_regex=1])
if test -n "$am_with_regex"; then
AC_MSG_RESULT(regex)
- AC_DEFINE(WITH_REGEX,1,[Define if using GNU regex])
+ AC_DEFINE(WITH_REGEX, 1, [Define if using GNU regex])
AC_CACHE_CHECK([for GNU regex in libc], am_cv_gnu_regex,
- [AC_TRY_LINK([], [extern int re_max_failures; re_max_failures = 1],
- am_cv_gnu_regex=yes, am_cv_gnu_regex=no)])
+ [AC_TRY_LINK([],
+ [extern int re_max_failures; re_max_failures = 1],
+ [am_cv_gnu_regex=yes],
+ [am_cv_gnu_regex=no])])
if test $am_cv_gnu_regex = no; then
LIBOBJS="$LIBOBJS regex.$ac_objext"
fi
Index: automake.in
--- automake.in Wed, 31 Jan 2001 22:34:58 +0100 akim (am/f/39_automake.i 1.27 755)
+++ automake.in Thu, 01 Feb 2001 21:53:06 +0100 akim (am/f/39_automake.i 1.27 755)
@@ -4331,7 +4331,7 @@ sub scan_autoconf_traces
local ($traces) = "$ENV{amtraces} ";
$traces .= ' -t AC_CONFIG_FILES';
- $traces .= ' -t _AC_LIBOBJ_DECL';
+ $traces .= ' -t AC_LIBSOURCE';
$traces .= ' -t AC_SUBST';
open (TRACES, "$traces |")
@@ -4350,7 +4350,7 @@ sub scan_autoconf_traces
# Look at potential Makefile.am's.
&scan_autoconf_config_files ($args[0]);
}
- elsif ($macro eq '_AC_LIBOBJ_DECL')
+ elsif ($macro eq 'AC_LIBSOURCE')
{
local ($source) = "$args[0].c";
# We should actually also `close' the sources: getopt.c