0e2182c
From 9c35377eaeebf366b3fbc65ddf19cce50551ad68 Mon Sep 17 00:00:00 2001
0e2182c
From: David Tardon <dtardon@redhat.com>
0e2182c
Date: Mon, 15 Feb 2016 18:39:45 +0100
0e2182c
Subject: [PATCH] cppunit-config no longer exists, use pkg-config
0e2182c
0e2182c
---
0e2182c
 configure.ac | 12 +++++-------
0e2182c
 1 file changed, 5 insertions(+), 7 deletions(-)
0e2182c
0e2182c
diff --git a/configure.ac b/configure.ac
0e2182c
index 981337d..2e663de 100644
0e2182c
--- a/configure.ac
0e2182c
+++ b/configure.ac
0e2182c
@@ -123,7 +123,6 @@ AC_PATH_PROG(LN, ln, cp)
0e2182c
 AC_PATH_PROG(CHMOD, chmod, $FALSE)
0e2182c
 AC_PATH_PROG(TR, tr, $FALSE)
0e2182c
 AC_PATH_PROG(RM, rm, $FALSE)
0e2182c
-AC_PATH_PROG(CPPUNITCONFIG, cppunit-config, false)
0e2182c
 dnl Libtool 2.2.6 requires: rm -f
0e2182c
 RM="$RM -f"
0e2182c
 
0e2182c
@@ -2728,19 +2727,18 @@ SQUID_DEFINE_BOOL(X_ACCELERATOR_VARY,${enable_x_accelerator_vary:=no},
0e2182c
 AC_MSG_NOTICE([X-Accelerator-Vary support enabled: $enable_x_accelerator_vary])
0e2182c
 
0e2182c
 
0e2182c
-if $CPPUNITCONFIG --help >/dev/null; then
0e2182c
-  squid_cv_cppunit_version="`$CPPUNITCONFIG --version`"
0e2182c
+PKG_CHECK_MODULES([SQUID_CPPUNIT], [cppunit], [
0e2182c
+  squid_cv_cppunit_version="`$PKG_CONFIG --modversion cppunit`"
0e2182c
   AC_MSG_NOTICE([using system installed cppunit version $squid_cv_cppunit_version])
0e2182c
   unset squid_cv_cppunit_version
0e2182c
-  SQUID_CPPUNIT_LIBS="`$CPPUNITCONFIG --libs`"
0e2182c
   SQUID_CPPUNIT_LA=''
0e2182c
-  SQUID_CPPUNIT_INC="`$CPPUNITCONFIG --cflags`"
0e2182c
-else
0e2182c
+  SQUID_CPPUNIT_INC="$SQUID_CPPUNIT_CFLAGS"
0e2182c
+], [
0e2182c
   AC_MSG_WARN([cppunit does not appear to be installed. squid does not require this, but code testing with 'make check' will fail.])
0e2182c
   SQUID_CPPUNIT_LA='' 
0e2182c
   SQUID_CPPUNIT_LIBS=''
0e2182c
   SQUID_CPPUNIT_INC=''
0e2182c
-fi
0e2182c
+])
0e2182c
 
0e2182c
 AC_ARG_WITH(cppunit-basedir,
0e2182c
   AS_HELP_STRING([--with-cppunit-basedir=PATH],
0e2182c
-- 
0e2182c
2.5.0
0e2182c