]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Portability: permit eCAP build without pkg-config
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 13 Oct 2012 06:01:01 +0000 (00:01 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 13 Oct 2012 06:01:01 +0000 (00:01 -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 277a0b3d14b643ac402598352b6db7b4d5aef65f..abe50f738b9bae07cc262172ace57050cae50c36 100644 (file)
@@ -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")