diff --git a/configure.ac b/configure.ac index 3987fc711..3118e89b4 100644 --- a/configure.ac +++ b/configure.ac @@ -1755,38 +1755,71 @@ AC_ARG_WITH(testnic, nic2=$withval AC_MSG_RESULT([Using --with-testnic=$withval])], [ +case $host in + *-*-linux*) + nic1=eth0 + nic2=eth0 + ;; + + *-*-solaris*) + nic1=hme0 + nic2=hme0 + ;; + + *-*-sunos*) + nic1=hme0 + nic2=hme0 + ;; + + *-apple-darwin*) + nic1=en0 + nic2=en0 + ;; + + *-*-openbsd*) + nic1=xl0 + nic2=xl0 + ;; + + *-*-freebsd*) + nic1=em0 + nic2=em0 + ;; + + *-*-cygwin) + nic1=%0 + nic2=%0 + ;; + + *) + AC_MSG_RESULT([$host is unknown! Using first non-loopback interface]) + nic1=%0 + nic2=%0 + ;; +esac]) dnl There's a bug in OS X which causes pcap_findalldevs() to make the wifi NIC to disassociate dnl so under OSX we disable the interface list feature disable_pcap_findalldevs=no - osx_frameworks=no dnl these need to be dynamic based on OS case $host in *-*-linux*) - nic1=eth0 - nic2=eth0 AC_DEFINE([HAVE_LINUX], [1], [Building Linux]) AC_MSG_RESULT(Linux) ;; *-*-solaris*) - nic1=hme0 - nic2=hme0 AC_DEFINE([HAVE_SOLARIS], [1], [Building Solaris]) AC_MSG_RESULT(Solaris) ;; *-*-sunos*) - nic1=hme0 - nic2=hme0 AC_DEFINE([HAVE_SUNOS], [1], [Building SunOS]) AC_MSG_RESULT(SunOS) ;; *-apple-darwin*) - nic1=en0 - nic2=en0 if test x$libpcap_version_096 = xno ; then disable_pcap_findalldevs=yes fi @@ -1796,33 +1829,24 @@ case $host in ;; *-*-openbsd*) - nic1=xl0 - nic2=xl0 AC_DEFINE([HAVE_OPENBSD], [1], [Building Open BSD]) AC_MSG_RESULT(OpenBSD) ;; *-*-freebsd*) - nic1=em0 - nic2=em0 AC_DEFINE([HAVE_FREEBSD], [1], [Building Free BSD]) AC_MSG_RESULT(FreeBSD) ;; *-*-cygwin) AC_MSG_RESULT(Win32/Cygwin) - nic1=%0 - nic2=%0 AC_DEFINE([HAVE_CYGWIN], [1], [Building Cygwin]) ;; *) - AC_MSG_RESULT([$host is unknown! Using first non-loopback interface]) - nic1=%0 - nic2=%0 + AC_MSG_RESULT([$host is unknown!]) ;; -esac]) - +esac AM_CONDITIONAL([ENABLE_OSX_FRAMEWORKS], test "$osx_frameworks" = "yes") AC_ARG_WITH(testnic2,