X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fregex.m4;h=e5468c655b642f762fa1c6865d42456f02cd9288;hb=84b0840f913fdc2d2f9c679decaed57673896592;hp=a9c238356722338c8e5a5aea6213b9fbbc11b552;hpb=1552be320dc029cfecda95ec298ee7f2913e5a7e;p=gnulib.git diff --git a/m4/regex.m4 b/m4/regex.m4 index a9c238356..e5468c655 100644 --- a/m4/regex.m4 +++ b/m4/regex.m4 @@ -1,15 +1,23 @@ -#serial 1 +#serial 2 -dnl From grep. +dnl Derived from code in GNU grep. AC_DEFUN(jm_WITH_REGEX, [ - AC_ARG_WITH(included-regex, - [ --without-included-regex don't compile regex], - jm_with_regex=$withval, - jm_with_regex=yes) - if test "$jm_with_regex" = yes; then - LIBOBJS="$LIBOBJS regex.o" - fi + 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, + [ + AC_ARG_WITH(included-regex, + [ --without-included-regex don't compile regex (use with caution)], + jm_with_regex=$withval, + jm_with_regex=yes) + if test "$jm_with_regex" = yes; then + LIBOBJS="$LIBOBJS regex.o" + fi + ], + ) ] )