656dce8
From 5b80ca39b1f01177e98c78bbc622dfda6f7a7e71 Mon Sep 17 00:00:00 2001
656dce8
From: Michal Sekletar <msekleta@redhat.com>
656dce8
Date: Mon, 29 Sep 2014 08:27:15 +0200
656dce8
Subject: [PATCH 2/4] pcap-config: mitigate multilib conflict
656dce8
656dce8
libdir path is different on 64bit and 32bit arches. Hence when installing both
656dce8
multilib versions on the system yum complains about conflicting pcap-config
656dce8
file.
656dce8
656dce8
Hence remove libdir references from pcap-config, libdir is in dynamic linker
656dce8
path anyway.
656dce8
---
656dce8
 pcap-config.in | 27 ++++++++-------------------
656dce8
 1 file changed, 8 insertions(+), 19 deletions(-)
656dce8
656dce8
diff --git a/pcap-config.in b/pcap-config.in
656dce8
index 206be3b..75f2c9f 100644
656dce8
--- a/pcap-config.in
656dce8
+++ b/pcap-config.in
99e93bf
@@ -7,7 +7,6 @@
99e93bf
 prefix="@prefix@"
99e93bf
 exec_prefix="@exec_prefix@"
99e93bf
 includedir="@includedir@"
99e93bf
-libdir="@libdir@"
99e93bf
 V_RPATH_OPT="@V_RPATH_OPT@"
99e93bf
 LIBS="@LIBS@"
d678c20
 PACKAGE_NAME="@PACKAGE_NAME@"
99e93bf
@@ -36,16 +35,6 @@ do
3324fa0
 	esac
3324fa0
 	shift
3324fa0
 done
07fdab9
-if [ "$V_RPATH_OPT" != "" ]
3324fa0
-then
3324fa0
-	#
3324fa0
-	# If libdir isn't /usr/lib, add it to the run-time linker path.
3324fa0
-	#
07fdab9
-	if [ "$libdir" != "/usr/lib" ]
3324fa0
-	then
07fdab9
-		RPATH=$V_RPATH_OPT$libdir
3324fa0
-	fi
3324fa0
-fi
3324fa0
 if [ "$static" = 1 ]
3324fa0
 then
3324fa0
 	#
99e93bf
@@ -54,16 +43,16 @@ then
3324fa0
 	#
3324fa0
 	if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
3324fa0
 	then
07fdab9
-		echo "-I$includedir -L$libdir -lpcap $LIBS"
3324fa0
+		echo "-lpcap @LIBS@"
3324fa0
 	elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
3324fa0
 	then
07fdab9
-		echo "-I$includedir -L$libdir $LIBS"
3324fa0
+		echo "@LIBS@"
3324fa0
 	elif [ "$show_cflags" = 1 ]
3324fa0
 	then
07fdab9
-		echo "-I$includedir"
3324fa0
+		echo ""
3324fa0
 	elif [ "$show_libs" = 1 ]
3324fa0
 	then
07fdab9
-		echo "-L$libdir -lpcap $LIBS"
3324fa0
+		echo "-lpcap @LIBS@"
3324fa0
 	elif [ "$show_additional_libs" = 1 ]
3324fa0
 	then
07fdab9
 		echo "$LIBS"
99e93bf
@@ -75,15 +64,15 @@ else
3324fa0
 	#
3324fa0
 	if [ "$show_cflags" = 1 -a "$show_libs" = 1 ]
3324fa0
 	then
d678c20
-		echo "-I$includedir -L$libdir $RPATH -l$PACKAGE_NAME"
3324fa0
+		echo "-lpcap"
3324fa0
 	elif [ "$show_cflags" = 1 -a "$show_additional_libs" = 1 ]
3324fa0
 	then
07fdab9
-		echo "-I$includedir"
3324fa0
+		echo ""
3324fa0
 	elif [ "$show_cflags" = 1 ]
3324fa0
 	then
07fdab9
-		echo "-I$includedir"
3324fa0
+		echo ""
3324fa0
 	elif [ "$show_libs" = 1 ]
3324fa0
 	then
d678c20
-		echo "-L$libdir $RPATH -l$PACKAGE_NAME"
3324fa0
+		echo "-lpcap"
3324fa0
 	fi
3324fa0
 fi
656dce8
-- 
656dce8
1.8.3.1
656dce8