lkundrak / rpms / squid

Forked from rpms/squid 4 years ago
Clone
Blob Blame History Raw
From 9c35377eaeebf366b3fbc65ddf19cce50551ad68 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Mon, 15 Feb 2016 18:39:45 +0100
Subject: [PATCH] cppunit-config no longer exists, use pkg-config

---
 configure.ac | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index 981337d..2e663de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -123,7 +123,6 @@ AC_PATH_PROG(LN, ln, cp)
 AC_PATH_PROG(CHMOD, chmod, $FALSE)
 AC_PATH_PROG(TR, tr, $FALSE)
 AC_PATH_PROG(RM, rm, $FALSE)
-AC_PATH_PROG(CPPUNITCONFIG, cppunit-config, false)
 dnl Libtool 2.2.6 requires: rm -f
 RM="$RM -f"
 
@@ -2728,19 +2727,18 @@ SQUID_DEFINE_BOOL(X_ACCELERATOR_VARY,${enable_x_accelerator_vary:=no},
 AC_MSG_NOTICE([X-Accelerator-Vary support enabled: $enable_x_accelerator_vary])
 
 
-if $CPPUNITCONFIG --help >/dev/null; then
-  squid_cv_cppunit_version="`$CPPUNITCONFIG --version`"
+PKG_CHECK_MODULES([SQUID_CPPUNIT], [cppunit], [
+  squid_cv_cppunit_version="`$PKG_CONFIG --modversion cppunit`"
   AC_MSG_NOTICE([using system installed cppunit version $squid_cv_cppunit_version])
   unset squid_cv_cppunit_version
-  SQUID_CPPUNIT_LIBS="`$CPPUNITCONFIG --libs`"
   SQUID_CPPUNIT_LA=''
-  SQUID_CPPUNIT_INC="`$CPPUNITCONFIG --cflags`"
-else
+  SQUID_CPPUNIT_INC="$SQUID_CPPUNIT_CFLAGS"
+], [
   AC_MSG_WARN([cppunit does not appear to be installed. squid does not require this, but code testing with 'make check' will fail.])
   SQUID_CPPUNIT_LA='' 
   SQUID_CPPUNIT_LIBS=''
   SQUID_CPPUNIT_INC=''
-fi
+])
 
 AC_ARG_WITH(cppunit-basedir,
   AS_HELP_STRING([--with-cppunit-basedir=PATH],
-- 
2.5.0