summaryrefslogtreecommitdiff
path: root/m4/regex.m4
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-07-04 00:17:52 +0000
committerJim Meyering <jim@meyering.net>1998-07-04 00:17:52 +0000
commit0142ca7d96ed46582227859297c8af19678c1310 (patch)
tree9617e47804c16420d6ad7f2e6c95a8705313fad7 /m4/regex.m4
parentbcfa9cbbd78cdccb7c9ca1fa54e0fe7e70fb40fc (diff)
downloadcoreutils-0142ca7d96ed46582227859297c8af19678c1310.tar.xz
*** empty log message ***
Diffstat (limited to 'm4/regex.m4')
-rw-r--r--m4/regex.m419
1 files changed, 18 insertions, 1 deletions
diff --git a/m4/regex.m4 b/m4/regex.m4
index 2a7bfe014..733ad3a4e 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -9,6 +9,23 @@ AC_DEFUN(jm_WITH_REGEX,
USE_REGEX=$withval,
USE_REGEX=yes)
- test "$USE_REGEX" = "yes" && LIBOBJS="$LIBOBJS regex.o"
+ if test "$USE_REGEX" = yes; then
+
+ LIBOBJS="$LIBOBJS regex.o"
+
+ else
+ if test x = y; then
+ # This code is deliberately never run via ./configure.
+ # FIXME: this is a hack to make autoheader put the corresponding
+ # HAVE_* undef for this symbol in config.h.in. This saves me the
+ # trouble of having to maintain the #undef in acconfig.h manually.
+ AC_CHECK_FUNCS(LIBC_REGEX)
+ fi
+ # Defining it this way (rather than via AC_DEFINE) short-circuits the
+ # autoheader check -- autoheader doesn't know it's already been taken
+ # care of by the hack above.
+ ac_kludge=HAVE_LIBC_REGEX
+ AC_DEFINE_UNQUOTED($ac_kludge)
+ fi
]
)