public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in net-proxy/havp/files: havp-0.92a-r1-pkg-config-libclamav.patch
@ 2013-10-12 14:10 Tom Wijsman (tomwij)
  0 siblings, 0 replies; only message in thread
From: Tom Wijsman (tomwij) @ 2013-10-12 14:10 UTC (permalink / raw
  To: gentoo-commits

tomwij      13/10/12 14:10:05

  Added:                havp-0.92a-r1-pkg-config-libclamav.patch
  Log:
  Fix linking with libclamav when cross compiling, patch by Bertrand Jacquin whom reported bug #472782.
  
  (Portage version: HEAD/cvs/Linux x86_64, signed Manifest commit with key 6D34E57D)

Revision  Changes    Path
1.1                  net-proxy/havp/files/havp-0.92a-r1-pkg-config-libclamav.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-proxy/havp/files/havp-0.92a-r1-pkg-config-libclamav.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-proxy/havp/files/havp-0.92a-r1-pkg-config-libclamav.patch?rev=1.1&content-type=text/plain

Index: havp-0.92a-r1-pkg-config-libclamav.patch
===================================================================
--- a/configure.in
+++ b/configure.in
@@ -5,6 +5,7 @@
 unset CDPATH
 
 AC_PROG_CXX
+PKG_PROG_PKG_CONFIG
 
 AC_PREFIX_DEFAULT(/usr/local)
 
@@ -83,48 +84,15 @@
 	AC_DEFINE(SSLTUNNEL)
 fi
 
-AC_MSG_CHECKING(for ClamAV scanner library)
-
 if test "$enable_clamav" = "yes"
 then
-	clamprefix="`clamav-config --prefix 2>/dev/null`"
-	clamversion="`clamav-config --version 2>/dev/null`"
-
-	if test "x$clamprefix" = "x"
-	then
-		AC_MSG_RESULT([clamav-config not found])
-
-		echo ""
-		echo " Error finding ClamAV installation!"
-		echo " Add ClamAV binaries path to PATH and run configure again."
-		echo ""
-		echo " To disable ClamAV library support, use --disable-clamav."
-		echo ""
-
-		exit 1
-	fi
-
-	for cl in `clamav-config --cflags 2>/dev/null`; do
-		if test "x`echo $cl | perl -ne 'print if (/^-I/)' 2>/dev/null`" != "x"
-		then
-			CFLAGS="$CFLAGS $cl"
-		fi
-	done
-
-	for cl in `clamav-config --libs 2>/dev/null`; do
-		if test "x`echo $cl | perl -ne 'print if (/(^-L|thread|c_r)/)' 2>/dev/null`" != "x"
-		then
-			LDFLAGS="$LDFLAGS $cl"
-		fi
-	done
-	LDFLAGS="$LDFLAGS -lclamav"
-
-	SCANNEROBJECTS="clamlibscanner.o"
-	AC_DEFINE(USECLAMLIB)
-
-	AC_MSG_RESULT([found $clamversion in $clamprefix])
-else
-	AC_MSG_RESULT([disabled :-(])
+	PKG_CHECK_MODULES(clamav, libclamav,
+		[CFLAGS="$clamav_CFLAGS $CFLAGS"
+		 LDFLAGS="$clamav_LIBS $LDFLAGS"
+
+		 SCANNEROBJECTS="clamlibscanner.o"
+		 AC_DEFINE(USECLAMLIB)
+		])
 fi
 
 AC_MSG_CHECKING(for Trend Micro scanner)





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-10-12 14:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-12 14:10 [gentoo-commits] gentoo-x86 commit in net-proxy/havp/files: havp-0.92a-r1-pkg-config-libclamav.patch Tom Wijsman (tomwij)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox