3 dnl Derived from code in GNU grep.
5 AC_DEFUN(jm_WITH_REGEX,
9 dnl Even packages that don't use regex.c can use this macro.
10 dnl Of course, for them it doesn't do anything.
12 syscmd([test -f lib/regex.c])
15 # By default, don't use the included regex.c on systems with glibc 2
16 test "$ac_cv_glibc" = yes && default=no || default=yes
18 AC_ARG_WITH(included-regex,
19 [ --without-included-regex don't compile regex; this is the default on
20 systems with version 2 of the GNU C library
21 (use with caution on other system)],
22 jm_with_regex=$withval,
23 jm_with_regex=$default)
24 if test "$jm_with_regex" = yes; then
25 LIBOBJS="$LIBOBJS regex.o"