--- configure.orig 2006-03-28 13:00:00.000000000 +0800 +++ configure 2014-09-10 00:44:22.750008451 +0800 @@ -3713,37 +3713,39 @@ fi; -LIBNET_CONFIG="libnet-config" # relative, using $PATH - -# Check whether --with-libnet or --without-libnet was given. -if test "${with_libnet+set}" = set; then - withval="$with_libnet" - - LIBNETCC="" - LIBNETLD="" - - test -x "$withval/bin/libnet-config" && LIBNET_CONFIG="$withval/bin/libnet-config" - test -x "$withval/libnet-config" && LIBNET_CONFIG="$withval/libnet-config" - - test -f "$withval/libnet.h" && LIBNETCC="$LIBNETCC -I$withval" - test -f "$withval/include/libnet.h" && LIBNETCC="$LIBNETCC -I$withval/include" - - test -f "$withval/libnet.a" && LIBNETLD="$LIBNETLD -L$withval" - test -f "$withval/lib/libnet.a" && LIBNETLD="$LIBNETLD -L$withval/lib" - - if test -z "$LIBNETCC" -o -z "$LIBNETLD" - then - { { echo "$as_me:$LINENO: error: No valid libnet library found in $withval" >&5 -echo "$as_me: error: No valid libnet library found in $withval" >&2;} - { (exit 1); exit 1; }; } - else - CPPFLAGS="$CPPFLAGS $LIBNETCC" - LDFLAGS="$LDFLAGS $LIBNETLD" - { echo "$as_me:$LINENO: using libnet in $withval" >&5 -echo "$as_me: using libnet in $withval" >&6;} - fi - -fi; +LIBNET_CONFIG="libnet11-config" # relative, using $PATH +CPPFLAGS="$CPPFLAGS $(${LIBNET_CONFIG} --cflags)" +LDFLAGS="$LDFLAGS $(${LIBNET_CONFIG} --libs)" + +## Check whether --with-libnet or --without-libnet was given. +#if test "${with_libnet+set}" = set; then +# withval="$with_libnet" +# +# LIBNETCC="" +# LIBNETLD="" +# +# test -x "$withval/bin/libnet-config" && LIBNET_CONFIG="$withval/bin/libnet-config" +# test -x "$withval/libnet-config" && LIBNET_CONFIG="$withval/libnet-config" +# +# test -f "$withval/libnet.h" && LIBNETCC="$LIBNETCC -I$withval" +# test -f "$withval/include/libnet.h" && LIBNETCC="$LIBNETCC -I$withval/include" +# +# test -f "$withval/libnet.a" && LIBNETLD="$LIBNETLD -L$withval" +# test -f "$withval/lib/libnet.a" && LIBNETLD="$LIBNETLD -L$withval/lib" +# +# if test -z "$LIBNETCC" -o -z "$LIBNETLD" +# then +# { { echo "$as_me:$LINENO: error: No valid libnet library found in $withval" >&5 +#echo "$as_me: error: No valid libnet library found in $withval" >&2;} +# { (exit 1); exit 1; }; } +# else +# CPPFLAGS="$CPPFLAGS $LIBNETCC" +# LDFLAGS="$LDFLAGS $LIBNETLD" +# { echo "$as_me:$LINENO: using libnet in $withval" >&5 +#echo "$as_me: using libnet in $withval" >&6;} +# fi +# +#fi; echo "$as_me:$LINENO: checking for pcap_open_live in -lpcap" >&5