e198a55e9e
dynamically links libpcap, reduces binary size by ~160KB git-svn-id: svn://svn.openwrt.org/openwrt/packages@16000 3c298f89-4303-0410-b956-a3cf2f4a3e73
80 lines
3.0 KiB
Diff
80 lines
3.0 KiB
Diff
tcpdump explicitly checks for a static version of libpcap in
|
|
../libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)? relative to its build dir
|
|
if found, tcpdump is linked statically against this lib
|
|
|
|
The patch removes the check for the static lib and headers in this relative
|
|
location for tcpdump's configure script.
|
|
|
|
Index: tcpdump-3.9.8/configure
|
|
===================================================================
|
|
--- tcpdump-3.9.8.orig/configure 2007-09-25 19:16:50.000000000 -0700
|
|
+++ tcpdump-3.9.8/configure 2009-05-21 17:17:07.000000000 -0700
|
|
@@ -9278,26 +9278,6 @@
|
|
LIBS="$LIBS $pfopen"
|
|
fi
|
|
fi
|
|
- { echo "$as_me:$LINENO: checking for local pcap library" >&5
|
|
-echo $ECHO_N "checking for local pcap library... $ECHO_C" >&6; }
|
|
- libpcap=FAIL
|
|
- lastdir=FAIL
|
|
- places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
|
|
- egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
|
|
- for dir in $places $srcdir/../libpcap $srcdir/libpcap ; do
|
|
- basedir=`echo $dir | sed -e 's/[ab][0-9]*$//'`
|
|
- if test $lastdir = $basedir ; then
|
|
- continue;
|
|
- fi
|
|
- lastdir=$dir
|
|
- if test -r $dir/libpcap.a ; then
|
|
- libpcap=$dir/libpcap.a
|
|
- d=$dir
|
|
- fi
|
|
- done
|
|
- if test $libpcap = FAIL ; then
|
|
- { echo "$as_me:$LINENO: result: not found" >&5
|
|
-echo "${ECHO_T}not found" >&6; }
|
|
{ echo "$as_me:$LINENO: checking for main in -lpcap" >&5
|
|
echo $ECHO_N "checking for main in -lpcap... $ECHO_C" >&6; }
|
|
if test "${ac_cv_lib_pcap_main+set}" = set; then
|
|
@@ -9362,40 +9342,6 @@
|
|
echo "$as_me: error: see the INSTALL doc for more info" >&2;}
|
|
{ (exit 1); exit 1; }; }
|
|
fi
|
|
- { echo "$as_me:$LINENO: checking for extraneous pcap header directories" >&5
|
|
-echo $ECHO_N "checking for extraneous pcap header directories... $ECHO_C" >&6; }
|
|
- if test \( ! -r /usr/local/include/pcap.h \) -a \
|
|
- \( ! -r /usr/include/pcap.h \); then
|
|
- if test -r /usr/local/include/pcap/pcap.h; then
|
|
- d="/usr/local/include/pcap"
|
|
- elif test -r /usr/include/pcap/pcap.h; then
|
|
- d="/usr/include/pcap"
|
|
- fi
|
|
- fi
|
|
- if test -z "$d" ; then
|
|
- { echo "$as_me:$LINENO: result: not found" >&5
|
|
-echo "${ECHO_T}not found" >&6; }
|
|
- else
|
|
- V_INCLS="-I$d $V_INCLS"
|
|
- { echo "$as_me:$LINENO: result: found -- -I$d added" >&5
|
|
-echo "${ECHO_T}found -- -I$d added" >&6; }
|
|
- fi
|
|
- else
|
|
- V_PCAPDEP=$libpcap
|
|
- places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
|
|
- egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
|
|
- if test -r $d/pcap.h; then
|
|
- V_INCLS="-I$d $V_INCLS"
|
|
- elif test -r $places/pcap.h; then
|
|
- V_INCLS="-I$places $V_INCLS"
|
|
- else
|
|
- { { echo "$as_me:$LINENO: error: cannot find pcap.h" >&5
|
|
-echo "$as_me: error: cannot find pcap.h" >&2;}
|
|
- { (exit see INSTALL); exit see INSTALL; }; }
|
|
- fi
|
|
- { echo "$as_me:$LINENO: result: $libpcap" >&5
|
|
-echo "${ECHO_T}$libpcap" >&6; }
|
|
- fi
|
|
LIBS="$libpcap $LIBS"
|
|
case "$host_os" in
|
|
|