*** empty log message ***
[gnulib.git] / m4 / regex.m4
1 #serial 1
2
3 dnl From grep.
4
5 AC_DEFUN(jm_WITH_REGEX,
6   [
7     AC_ARG_WITH(included-regex,
8                 [  --without-included-regex don't compile regex],
9                 USE_REGEX=$withval,
10                 USE_REGEX=yes)
11
12     if test "$USE_REGEX" = yes; then
13
14       LIBOBJS="$LIBOBJS regex.o"
15
16     else
17       if test x = y; then
18         # This code is deliberately never run via ./configure.
19         # FIXME: this is a hack to make autoheader put the corresponding
20         # HAVE_* undef for this symbol in config.h.in.  This saves me the
21         # trouble of having to maintain the #undef in acconfig.h manually.
22         AC_CHECK_FUNCS(LIBC_REGEX)
23       fi
24       # Defining it this way (rather than via AC_DEFINE) short-circuits the
25       # autoheader check -- autoheader doesn't know it's already been taken
26       # care of by the hack above.
27       ac_kludge=HAVE_LIBC_REGEX
28       AC_DEFINE_UNQUOTED($ac_kludge)
29     fi
30   ]
31 )