Fresh pull from upstream
[librecmc/librecmc.git] / package / network / utils / tcpdump / patches / 002-remove_static_libpcap_check.patch
index c8bdf1499e174bc28e7e6572cf82ba59a82eb6ed..4855ec387229c63ca31ffe33308910a0a86cb0f7 100644 (file)
@@ -1,35 +1,44 @@
 --- a/configure
 +++ b/configure
-@@ -5813,28 +5813,6 @@ $as_echo "Using $pfopen" >&6; }
+@@ -5472,37 +5472,6 @@ $as_echo "Using $pfopen" >&6; }
                    LIBS="$LIBS $pfopen"
            fi
      fi
--    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for local pcap library" >&5
+-      libpcap=FAIL
+-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for local pcap library" >&5
 -$as_echo_n "checking for local pcap library... " >&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
+-
+-# 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.
-           #
-@@ -5989,41 +5967,6 @@ if test "x$ac_cv_lib_pcap_main" = xyes;
+@@ -5658,51 +5627,6 @@ if test "x$ac_cv_lib_pcap_main" = xyes;
    libpcap="-lpcap"
  fi
  
 -          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
--                    as_fn_error see INSTALL "cannot find pcap.h" "$LINENO" 5
+-                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
+-            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.