diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2015-04-06 16:09:39 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-04-06 16:10:56 -0700 |
commit | 8ee53e2a2804a7cecda91a5e249aa29e6c18f65a (patch) | |
tree | c1b00a42e7d21d646eb524a0bd047cecd7004556 /m4 | |
parent | 6d569b5cd719bd367581fb62b32a228900d43a70 (diff) | |
download | grep-8ee53e2a2804a7cecda91a5e249aa29e6c18f65a.tar.gz |
build: improve pkg-config doc and error handling
Error-handling improvement suggested by Mike Frysinger in:
http://bugs.gnu.org/16757#29
* NEWS: Document pkg-config changes.
* README-prereq: pkg-config is now a prereq when building from
repository.
* m4/pcre.m4 (gl_FUNC_PCRE): Report an error if pcre is explicitly
requested but not available. Defer to user-supplied PCRE_CFLAGS
and PCRE_LIBS.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/pcre.m4 | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -14,16 +14,14 @@ AC_DEFUN([gl_FUNC_PCRE], yes|no) test_pcre=$enableval;; *) AC_MSG_ERROR([invalid value $enableval for --disable-perl-regexp]);; esac], - [test_pcre=yes]) + [test_pcre=maybe]) - PCRE_CFLAGS= - PCRE_LIBS= AC_SUBST([PCRE_CFLAGS]) AC_SUBST([PCRE_LIBS]) use_pcre=no - if test $test_pcre = yes; then - PKG_CHECK_MODULES([PCRE], [libpcre], [], [PCRE_LIBS=-lpcre]) + if test $test_pcre != no; then + PKG_CHECK_MODULES([PCRE], [libpcre], [], [: ${PCRE_LIBS=-lpcre}]) AC_CACHE_CHECK([for pcre_compile], [pcre_cv_have_pcre_compile], [pcre_saved_CFLAGS=$CFLAGS @@ -42,8 +40,10 @@ AC_DEFUN([gl_FUNC_PCRE], if test "$pcre_cv_have_pcre_compile" = yes; then use_pcre=yes - else + elif test $test_pcre = maybe; then AC_MSG_WARN([AC_PACKAGE_NAME will be built without pcre support.]) + else + AC_MSG_ERROR([pcre support not available]) fi fi |