diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2015-04-06 15:49:50 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-04-06 16:10:56 -0700 |
commit | 936ae4a5e6c8fd27d86c2f9e0f46c61c8c15c4ff (patch) | |
tree | 750e53c043e96311d6baf496401c269c714e2fe5 /configure.ac | |
parent | ff38f097a41ddf908e3036524319de5a3aa6188e (diff) | |
download | grep-936ae4a5e6c8fd27d86c2f9e0f46c61c8c15c4ff.tar.gz |
build: use pkg-config (if available) to configure libpcre
Problem reported by Mike Frysinger in: http://bugs.gnu.org/16757
* bootstrap.conf (bootstrap_post_import_hook):
Copy pkg-config's pkg.m4.
* configure.ac: Invoke PKG_PROG_PKG_CONFIG.
* m4/pcre.m4 (gl_FUNC_PCRE): Rewrite to use pkg-config if
available, and to test that pcre_compile can be linked to.
* src/Makefile.am (AM_CFLAGS): Add PCRE_CFLAGS.
(grep_LDADD): Add PCRE_LIBS.
* src/pcresearch.c: Simply include <pcre.h> if HAVE_LIBPCRE,
since 'configure' arranges for the appropriate -I option now.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 9ee391a1..3f6d3899 100644 --- a/configure.ac +++ b/configure.ac @@ -82,6 +82,7 @@ AC_PROG_INSTALL AC_PROG_CC gl_EARLY AC_PROG_RANLIB +PKG_PROG_PKG_CONFIG([0.9.0]) # grep never invokes mbrtowc or mbrlen on empty input, # so don't worry about this common bug, |