]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Portability: permit eCAP build without pkg-config
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 8 Oct 2012 06:30:38 +0000 (00:30 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 8 Oct 2012 06:30:38 +0000 (00:30 -0600)
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.

configure.ac

index 7f1c2cdd20baa66d8c3fa316b92418547889e16c..1b8a6640628af345e11fc735693a018c8d40bd22 100644 (file)
@@ -1001,19 +1001,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")