summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-01-20 09:52:09 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2019-01-20 10:01:37 -0800
commitf777b3e613e5ea9a7d607105abc2b543ef7be0f1 (patch)
treeff695d13a1478c90d19f52083bd444134ac493cf /configure.ac
parent1019e6e35af3ca1ae1b147b327e155e0a2d17f6f (diff)
downloadgrep-f777b3e613e5ea9a7d607105abc2b543ef7be0f1.tar.gz
grep: simplify pcresearch.c ifdefs
This fixes a warning if PCRE is not used (Bug#34054). * configure.ac (USE_PCRE): New conditional. * src/Makefile.am (grep_SOURCES) [!USE_PCRE]: Omit pcresearch.c. * src/grep.c (matchers) [!HAVE_LIBPCRE]: Omit perl matcher. (setmatcher) [!HAVE_LIBPCRE]: If helpful, mention --disable-perl-regexp in diagnostic. * src/pcresearch.c: Simplify by assuming HAVE_LIBPCRE.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac1
1 files changed, 1 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 4ce72160..1bbfc4f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -206,6 +206,7 @@ if test "$ac_use_included_regex" = no; then
fi
gl_FUNC_PCRE
+AM_CONDITIONAL([USE_PCRE], [test $use_pcre = yes])
case $host_os in
mingw*) suffix=w32 ;;