aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch
diff options
context:
space:
mode:
authorJoe Slater <jslater@windriver.com>2014-12-10 14:37:08 -0800
committerMartin Jansa <Martin.Jansa@gmail.com>2014-12-19 20:10:55 +0100
commit2a1cbf5ca9e5aa9d49bc8779a625f93d70b59487 (patch)
tree4d029b5791e0bb03feb6ac3192d456314d6970ba /meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch
parentedcf03b5fb576dbeae3784471aec8c2b7a9a04a8 (diff)
downloadmeta-openembedded-contrib-2a1cbf5ca9e5aa9d49bc8779a625f93d70b59487.tar.gz
tcpreplay: improve search for libpcap
Add a test to find libpcap if testdir/.. is a sysroot. Upstream-Status: Pending Signed-off-by: Joe Slater <jslater@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch')
-rw-r--r--meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch b/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch
new file mode 100644
index 0000000000..50f024c67b
--- /dev/null
+++ b/meta-networking/recipes-support/tcpreplay/files/tcpreplay-3.4.4-improve-search-for-libpcap.patch
@@ -0,0 +1,33 @@
+tcpreplay: improve search for libpcap
+
+Add a test which will find libpcap if $testdir/.. is a sysroot.
+
+Upstream-Status: Pending
+
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -350,14 +350,20 @@ for testdir in $trypcapdir /usr/local /o
+ if test -f "${testdir}/include/pcap.h" -a $foundpcap = no ; then
+ LPCAPINC="${testdir}/include/pcap.h"
+ LPCAPINCDIR="${testdir}/include"
++ # If testdir/.. is a sysroot, then sDir should point to where the libraries are.
++ sDir=$(readlink -m ${testdir}/../${libdir})
+ if test $dynamic_link = yes; then
+- if test -f "${testdir}/lib64/libpcap${shrext_cmds}" ; then
++ if test -f "${sDir}/libpcap${shrext_cmds}" ; then
++ LPCAPLIB="-L${sDir} -lpcap"
++ elif test -f "${testdir}/lib64/libpcap${shrext_cmds}" ; then
+ LPCAPLIB="-L${testdir}/lib64 -lpcap"
+ elif test -f "${testdir}/lib/libpcap${shrext_cmds}" ; then
+ LPCAPLIB="-L${testdir}/lib -lpcap"
+ else
+ AC_ERROR([Unable to find libpcap in ${testdir}])
+ fi
++ elif test -f "${sDir}/libpcap.${libext}" ; then
++ LPCAPLIB="${sDir}/libpcap.${libext}"
+ elif test -f "${testdir}/lib64/libpcap.${libext}" ; then
+ LPCAPLIB="${testdir}/lib64/libpcap.${libext}"
+ elif test -f "${testdir}/lib/libpcap.${libext}" ; then