1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

use pkg-config to check pcre deps if available

Newer versions of these packages ship with pkg-config files, so if we can
detect it via those, do so.  If that fails, fall back to the old methods.

Also add a configure flag to explicitly control its usage.
This commit is contained in:
Mike Frysinger 2014-10-27 14:55:23 -04:00 committed by Giuseppe Scrivano
parent d272339fda
commit 47d0d4c331
2 changed files with 21 additions and 7 deletions

View File

@ -6,6 +6,9 @@
* configure.ac: Use pkg-config to check for libuuid presence and * configure.ac: Use pkg-config to check for libuuid presence and
fallback to the previous code if that doesn't work. fallback to the previous code if that doesn't work.
* configure.ac: Use pkg-config to check for pcre presence and
fallback to the previous code if that doesn't work.
2014-07-28 Ángel González <keisial@gmail.com> 2014-07-28 Ángel González <keisial@gmail.com>
* contrib: Created contrib folder. * contrib: Created contrib folder.
* contrib/tsocked-wget: Added wrapper for usage with socks proxy. * contrib/tsocked-wget: Added wrapper for usage with socks proxy.

View File

@ -600,13 +600,24 @@ dnl
dnl Check for PCRE dnl Check for PCRE
dnl dnl
AC_CHECK_HEADER(pcre.h, AC_ARG_ENABLE(pcre, AC_HELP_STRING([--disable-pcre],
[Disable PCRE style regular expressions]))
AS_IF([test "X$enable_pcre" != "Xno"],[
PKG_CHECK_MODULES([PCRE], libpcre, [
LIBS="$PCRE_LIBS $LIBS"
CFLAGS="$PCRE_CFLAGS $CFLAGS"
AC_DEFINE([HAVE_LIBPCRE], [1], [Define if using libpcre.])
], [
AC_CHECK_HEADER(pcre.h,
AC_CHECK_LIB(pcre, pcre_compile, AC_CHECK_LIB(pcre, pcre_compile,
[LIBS="${LIBS} -lpcre" [LIBS="${LIBS} -lpcre"
AC_DEFINE([HAVE_LIBPCRE], 1, AC_DEFINE([HAVE_LIBPCRE], 1,
[Define if libpcre is available.]) [Define if libpcre is available.])
]) ])
) )
])
])
dnl Needed by src/Makefile.am dnl Needed by src/Makefile.am