summaryrefslogtreecommitdiff
path: root/src/Makefile.am
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 /src/Makefile.am
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 'src/Makefile.am')
-rw-r--r--src/Makefile.am4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 40e9a96e..1cfca3f1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -29,8 +29,10 @@ grep_SOURCES = \
grep.c \
kwsearch.c \
kwset.c \
- pcresearch.c \
searchutils.c
+if USE_PCRE
+grep_SOURCES += pcresearch.c
+endif
noinst_HEADERS = grep.h kwset.h search.h system.h