tcpdump: update to 4.9.3
[oweals/openwrt.git] / package / network / utils / tcpdump / patches / 002-remove_static_libpcap_check.patch
index 8ab54aa6bcfae05dd7a973381d0e0fbf8f60cb26..fdebfcc6d851c3a32d1227ee53e8c232f88e353a 100644 (file)
@@ -1,45 +1,52 @@
 --- a/configure
 +++ b/configure
-@@ -7130,28 +7130,6 @@ echo "${ECHO_T}Using $pfopen" >&6; }
+@@ -5395,37 +5395,6 @@ $as_echo "Using $pfopen" >&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]*|-PRE-GIT)?$'`
--    for dir in $places $srcdir/../libpcap $srcdir/libpcap ; do
--          basedir=`echo $dir | sed -e 's/[ab][0-9]*$//' | \
--              sed -e 's/-PRE-GIT$//' `
--          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; }
+-      libpcap=FAIL
+-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for local pcap library" >&5
+-$as_echo_n "checking for local pcap library... " >&6; }
+-
+-# Check whether --with-system-libpcap was given.
+-if test "${with_system_libpcap+set}" = set; then :
+-  withval=$with_system_libpcap;
+-fi
 -
+-      if test "x$with_system_libpcap" != xyes ; then
+-              lastdir=FAIL
+-      places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
+-              egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT)?$'`
+-      places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
+-              egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT)?$'`
+-      for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
+-              basedir=`echo $dir | sed -e 's/[ab][0-9]*$//' | \
+-                      sed -e 's/-PRE-GIT$//' `
+-              if test $lastdir = $basedir ; then
+-                                              continue;
+-              fi
+-              lastdir=$dir
+-              if test -r $dir/libpcap.a ; then
+-                      libpcap=$dir/libpcap.a
+-                      d=$dir
+-                                      fi
+-              done
+-      fi
+-    if test $libpcap = FAIL ; then
+-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+-$as_echo "not found" >&6; }
            #
            # Look for pcap-config.
-           #
-@@ -7335,45 +7313,6 @@ if test $ac_cv_lib_pcap_main = yes; then
+@@ -5581,51 +5550,6 @@ if test "x$ac_cv_lib_pcap_main" = xyes;
    libpcap="-lpcap"
  fi
  
 -              if test $libpcap = FAIL ; then
--                  { { echo "$as_me:$LINENO: error: see the INSTALL doc for more info" >&5
--echo "$as_me: error: see the INSTALL doc for more info" >&2;}
--   { (exit 1); exit 1; }; }
+-                  as_fn_error $? "see the INSTALL doc for more info" "$LINENO" 5
 -              fi
--                                                                                                                                                                                                                                                                                                                              { echo "$as_me:$LINENO: checking for extraneous pcap header directories" >&5
--echo $ECHO_N "checking for extraneous pcap header directories... $ECHO_C" >&6; }
+-                                                                                                                                                                                                                                                                                                                              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extraneous pcap header directories" >&5
+-$as_echo_n "checking for extraneous pcap header directories... " >&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
 -                  fi
 -              fi
 -              if test -z "$d" ; then
--                  { echo "$as_me:$LINENO: result: not found" >&5
--echo "${ECHO_T}not found" >&6; }
+-                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+-$as_echo "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; }
+-                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: found -- -I$d added" >&5
+-$as_echo "found -- -I$d added" >&6; }
 -              fi
 -          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]*)?$'`
+-          places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
+-                      egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
+-            pcapH=FAIL
 -          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"
+-                    pcapH=$d
 -          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; }; }
+-                for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
+-                   if test -r $dir/pcap.h ; then
+-                       pcapH=$dir
+-                   fi
+-                done
+-            fi
+-
+-            if test $pcapH = FAIL ; then
+-                    as_fn_error $? "cannot find pcap.h: see INSTALL" "$LINENO" 5
 -          fi
--          { echo "$as_me:$LINENO: result: $libpcap" >&5
--echo "${ECHO_T}$libpcap" >&6; }
+-            V_INCLS="-I$pcapH $V_INCLS"
+-          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libpcap" >&5
+-$as_echo "$libpcap" >&6; }
            # Extract the first word of "pcap-config", so it can be a program name with args.
  set dummy pcap-config; ac_word=$2
- { echo "$as_me:$LINENO: checking for $ac_word" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5