1From acee9c0c46f71f1f4c33c2dadf69d19e24b90f27 Mon Sep 17 00:00:00 2001 2From: Fabrice Fontaine <fontaine.fabrice@gmail.com> 3Date: Tue, 13 Aug 2019 20:19:23 +0200 4Subject: [PATCH] configure.ac: fix --without-libdnet 5 6Allow the user to disable libdnet check through --without-libdnet. 7This option is useful to cross-compile tcpreplay to avoid build failures 8if libdnet is installed on host but not on target, see 9https://bugs.buildroot.org/show_bug.cgi?id=12096 10 11Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 12[Upstream status: https://github.com/appneta/tcpreplay/pull/567] 13--- 14 configure.ac | 48 +++++++++++++++++++++++++----------------------- 15 1 file changed, 25 insertions(+), 23 deletions(-) 16 17diff --git a/configure.ac b/configure.ac 18index 39ba58b7..5de3dcb5 100644 19--- a/configure.ac 20+++ b/configure.ac 21@@ -1464,30 +1464,32 @@ if test $have_cygwin = no ; then 22 AC_HELP_STRING([--with-libdnet=DIR], [Use libdnet in DIR]), 23 [trydnetdir=$withval]) 24 25- case "$build_os" in 26- linux*) 27- dnl # Debian/Ubuntu already have a package called libdnet 28- dnl # so you the package you want to install libdumbnet-dev 29- for testdir in $trydnetdir /usr/local /opt/local /usr ; do 30- if test -x ${testdir}/bin/dumbnet-config -a $founddnet = no ; then 31- LDNETINC="$($testdir/bin/dumbnet-config --cflags)" 32- LDNETLIB="$($testdir/bin/dumbnet-config --libs)" 33- libdnet_version="$($testdir/bin/dumbnet-config --version) (libdumbnet)" 34- founddnet=$testdir 35- fi 36- done 37- ;; 38- esac 39+ if test $trydnetdir != no; then 40+ case "$build_os" in 41+ linux*) 42+ dnl # Debian/Ubuntu already have a package called libdnet 43+ dnl # so you the package you want to install libdumbnet-dev 44+ for testdir in $trydnetdir /usr/local /opt/local /usr ; do 45+ if test -x ${testdir}/bin/dumbnet-config -a $founddnet = no ; then 46+ LDNETINC="$($testdir/bin/dumbnet-config --cflags)" 47+ LDNETLIB="$($testdir/bin/dumbnet-config --libs)" 48+ libdnet_version="$($testdir/bin/dumbnet-config --version) (libdumbnet)" 49+ founddnet=$testdir 50+ fi 51+ done 52+ ;; 53+ esac 54 55- if test $founddnet = no ; then 56- for testdir in $trydnetdir /usr/local /opt/local $MACOSX_SDK_PATH/usr /usr ; do 57- if test -x ${testdir}/bin/dnet-config -a $founddnet = no ; then 58- LDNETINC="$($testdir/bin/dnet-config --cflags)" 59- LDNETLIB="$($testdir/bin/dnet-config --libs)" 60- libdnet_version="$($testdir/bin/dnet-config --version)" 61- founddnet=$testdir 62- fi 63- done 64+ if test $founddnet = no ; then 65+ for testdir in $trydnetdir /usr/local /opt/local $MACOSX_SDK_PATH/usr /usr ; do 66+ if test -x ${testdir}/bin/dnet-config -a $founddnet = no ; then 67+ LDNETINC="$($testdir/bin/dnet-config --cflags)" 68+ LDNETLIB="$($testdir/bin/dnet-config --libs)" 69+ libdnet_version="$($testdir/bin/dnet-config --version)" 70+ founddnet=$testdir 71+ fi 72+ done 73+ fi 74 fi 75 76 if test $founddnet = no ; then 77