summaryrefslogtreecommitdiff
path: root/m4/regex.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/regex.m4')
-rw-r--r--m4/regex.m421
1 files changed, 13 insertions, 8 deletions
diff --git a/m4/regex.m4 b/m4/regex.m4
index 382c3ed1..7a0b9bbb 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -3,18 +3,23 @@ dnl Of course, for them it doesn't do anything.
dnl Derived from code in GNU grep.
dnl Derived from code in GNU fileutils ;-).
-AC_DEFUN(AM_WITH_REGEX,
+AC_DEFUN(AM_INCLUDED_REGEX,
[AC_REQUIRE([AM_GLIBC])
-AC_CACHE_CHECK([whether compiling regex.c], ac_cv_with_regex,
-[ # By default, don't use the included regex.c on systems with glibc 2
-test "$ac_cv_glibc" = yes && default=no || default=yes
+AC_CACHE_CHECK([whether compiling regex.c], ac_cv_included_regex,
+[
+# By default, don't use the included regex.c on systems with glibc 2
+if test x"$ac_cv_glibc" = xyes ; then
+ default=no
+else
+ default=yes
+fi
AC_ARG_WITH(included-regex,
[ --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)],
- ac_cv_with_regex=$withval,
- ac_cv_with_regex=$default)
-if test "$ac_cv_with_regex" = yes; then
- LIBOBJS="$LIBOBJS regex.o"
+ ac_cv_included_regex=$withval,
+ ac_cv_included_regex=$default)
+if test x"$ac_cv_included_regex" = xyes; then
+ LIBOBJS="$LIBOBJS regex.${ac_objext}"
fi
])])