6d96c2eacdafe6dc11ea12aec75bb99bf5309ff7
[openwrt/openwrt.git] / package / network / utils / tcpdump / patches / 002-remove_static_libpcap_check.patch
1 --- a/configure
2 +++ b/configure
3 @@ -5471,37 +5471,6 @@ $as_echo "Using $pfopen" >&6; }
4 LIBS="$LIBS $pfopen"
5 fi
6 fi
7 - libpcap=FAIL
8 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for local pcap library" >&5
9 -$as_echo_n "checking for local pcap library... " >&6; }
10 -
11 -# Check whether --with-system-libpcap was given.
12 -if test "${with_system_libpcap+set}" = set; then :
13 - withval=$with_system_libpcap;
14 -fi
15 -
16 - if test "x$with_system_libpcap" != xyes ; then
17 - lastdir=FAIL
18 - places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
19 - egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT)?$'`
20 - places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
21 - egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT)?$'`
22 - for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
23 - basedir=`echo $dir | sed -e 's/[ab][0-9]*$//' | \
24 - sed -e 's/-PRE-GIT$//' `
25 - if test $lastdir = $basedir ; then
26 - continue;
27 - fi
28 - lastdir=$dir
29 - if test -r $dir/libpcap.a ; then
30 - libpcap=$dir/libpcap.a
31 - d=$dir
32 - fi
33 - done
34 - fi
35 - if test $libpcap = FAIL ; then
36 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37 -$as_echo "not found" >&6; }
38
39 #
40 # Look for pcap-config.
41 @@ -5657,51 +5626,6 @@ if test "x$ac_cv_lib_pcap_main" = xyes;
42 libpcap="-lpcap"
43 fi
44
45 - if test $libpcap = FAIL ; then
46 - as_fn_error $? "see the INSTALL doc for more info" "$LINENO" 5
47 - fi
48 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extraneous pcap header directories" >&5
49 -$as_echo_n "checking for extraneous pcap header directories... " >&6; }
50 - if test \( ! -r /usr/local/include/pcap.h \) -a \
51 - \( ! -r /usr/include/pcap.h \); then
52 - if test -r /usr/local/include/pcap/pcap.h; then
53 - d="/usr/local/include/pcap"
54 - elif test -r /usr/include/pcap/pcap.h; then
55 - d="/usr/include/pcap"
56 - fi
57 - fi
58 - if test -z "$d" ; then
59 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
60 -$as_echo "not found" >&6; }
61 - else
62 - V_INCLS="-I$d $V_INCLS"
63 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: found -- -I$d added" >&5
64 -$as_echo "found -- -I$d added" >&6; }
65 - fi
66 - fi
67 - else
68 - V_PCAPDEP=$libpcap
69 - places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
70 - egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
71 - places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
72 - egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
73 - pcapH=FAIL
74 - if test -r $d/pcap.h; then
75 - pcapH=$d
76 - else
77 - for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
78 - if test -r $dir/pcap.h ; then
79 - pcapH=$dir
80 - fi
81 - done
82 - fi
83 -
84 - if test $pcapH = FAIL ; then
85 - as_fn_error $? "cannot find pcap.h: see INSTALL" "$LINENO" 5
86 - fi
87 - V_INCLS="-I$pcapH $V_INCLS"
88 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libpcap" >&5
89 -$as_echo "$libpcap" >&6; }
90 # Extract the first word of "pcap-config", so it can be a program name with args.
91 set dummy pcap-config; ac_word=$2
92 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5