From: Amos Jeffries Date: Sat, 13 Oct 2012 06:01:01 +0000 (-0600) Subject: Portability: permit eCAP build without pkg-config X-Git-Tag: SQUID_3_3_0_1~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21dbf60400cc84bc88eef4d3c01ad7e5d20d0866;p=thirdparty%2Fsquid.git Portability: permit eCAP build without pkg-config Windows does not have a port of pkg-config, other OS may be in the same situation. That only impacts on Squids ability to confirm the library version not on its ability to link and use it. This reduces some configure errors to warnings when pkg-config is not located on the local system. --- diff --git a/configure.ac b/configure.ac index 277a0b3d14..abe50f738b 100644 --- a/configure.ac +++ b/configure.ac @@ -1002,19 +1002,23 @@ dnl Necessary if the first PKG_CHECK_MODULES call is conditional PKG_PROG_PKG_CONFIG dnl Perform configuration consistency checks for eCAP -if test "x$squid_opt_use_ecap" = "xyes"; +if test "x$squid_opt_use_ecap" != "xno"; then - dnl eCAP support requires loadable modules, which are enabled by default - if test "x$enable_loadable_modules" != "xyes" - then - AC_MSG_ERROR([eCAP support requires loadable modules. Please do not use --disable-loadable-modules with --enable-ecap.]); - fi + dnl eCAP support requires loadable modules, which are enabled by default + if test "x$enable_loadable_modules" != "xyes" + then + AC_MSG_ERROR([eCAP support requires loadable modules. Please do not use --disable-loadable-modules with --enable-ecap.]) + fi + if test -n "$PKG_CONFIG"; then dnl eCAP support requires libecap. dnl This Squid supports libecap v0.2.x. dnl Use EXT_ prefix to distinguish external libecap (that we check for dnl here) from our own convenience ecap library in Makefiles. - PKG_CHECK_MODULES(EXT_LIBECAP, [libecap > 0.2 libecap < 0.3]) + PKG_CHECK_MODULES([EXT_LIBECAP],[libecap >= 0.2.0 libecap < 0.3]) + else + AC_MSG_NOTICE([eCAP support requires pkg-config to verify the correct library version. Trouble may follow.]) + fi fi AM_CONDITIONAL(USE_ECAP, test "x$squid_opt_use_ecap" = "xyes")