summaryrefslogtreecommitdiff
path: root/m4/regex.m4
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-01-10 14:57:00 +0000
committerJim Meyering <jim@meyering.net>1999-01-10 14:57:00 +0000
commitea9ec4ab46c234365a0ce81ba090771b41973d7d (patch)
tree89a3c871ca9c32bdddeb0e854664cb4049e86752 /m4/regex.m4
parent37f6675617dbb68c48517466d151bd100ae8bcdb (diff)
downloadcoreutils-ea9ec4ab46c234365a0ce81ba090771b41973d7d.tar.xz
By default, don't use the included regex.c on systems
with glibc 2. Suggestion from Uli Drepper.
Diffstat (limited to 'm4/regex.m4')
-rw-r--r--m4/regex.m413
1 files changed, 10 insertions, 3 deletions
diff --git a/m4/regex.m4 b/m4/regex.m4
index e5468c655..2a638d6af 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,19 +1,26 @@
-#serial 2
+#serial 3
dnl Derived from code in GNU grep.
AC_DEFUN(jm_WITH_REGEX,
[
+ AC_REQUIRE([AM_GLIBC])
+
dnl Even packages that don't use regex.c can use this macro.
dnl Of course, for them it doesn't do anything.
syscmd([test -f lib/regex.c])
ifelse(sysval, 0,
[
+ # By default, don't use the included regex.c on systems with glibc 2
+ test "$ac_cv_glibc" = yes && default=no || default=yes
+
AC_ARG_WITH(included-regex,
- [ --without-included-regex don't compile regex (use with caution)],
+ [ --without-included-regex don't compile regex; this is the default on
+ systems with version 2 of the GNU C library
+ (use with caution on other system)],
jm_with_regex=$withval,
- jm_with_regex=yes)
+ jm_with_regex=$default)
if test "$jm_with_regex" = yes; then
LIBOBJS="$LIBOBJS regex.o"
fi