--- configure.orig 2012-08-02 14:44:05.000000000 -0400 +++ configure 2012-08-02 14:48:08.000000000 -0400 @@ -644,6 +644,8 @@ USE_LINKER_SECTIONS_TRUE RUNDIR PKIDIR +HAVE_IF_DL_FALSE +HAVE_IF_DL_TRUE HAVE_IF_PACKET_FALSE HAVE_IF_PACKET_TRUE HAVE_DOT_FALSE @@ -759,6 +761,7 @@ with_build_number enable_dependency_tracking enable_largefile +enable_threaded enable_coverage enable_ndebug enable_ssl @@ -1406,6 +1409,7 @@ --disable-dependency-tracking speeds up one-time build --disable-largefile omit support for large files + --enable-threaded Enable threaded version of userspace implementation --enable-coverage Enable gcov coverage tool. --enable-ndebug Disable debugging features for max performance --disable-ssl Disable OpenSSL support @@ -5217,7 +5221,80 @@ fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pcap_open_live" >&5 +$as_echo_n "checking for library containing pcap_open_live... " >&6; } +if ${ac_cv_search_pcap_open_live+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char pcap_open_live (); +int +main () +{ +return pcap_open_live (); + ; + return 0; +} +_ACEOF +for ac_lib in '' pcap; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_pcap_open_live=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_pcap_open_live+:} false; then : + break +fi +done +if ${ac_cv_search_pcap_open_live+:} false; then : +else + ac_cv_search_pcap_open_live=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pcap_open_live" >&5 +$as_echo "$ac_cv_search_pcap_open_live" >&6; } +ac_res=$ac_cv_search_pcap_open_live +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + + + # Check whether --enable-threaded was given. +if test "${enable_threaded+set}" = set; then : + enableval=$enable_threaded; case "${enableval}" in + (yes) coverage=true ;; + (no) coverage=false ;; + (*) as_fn_error $? "bad value ${enableval} for --enable-threaded" "$LINENO" 5 ;; + esac +else + threaded=false +fi + + if $threaded; then + +$as_echo "#define THREADED 1" >>confdefs.h + + fi # Check whether --enable-coverage was given. if test "${enable_coverage+set}" = set; then : @@ -5807,6 +5884,27 @@ $as_echo "#define HAVE_IF_PACKET 1" >>confdefs.h fi +ac_fn_c_check_header_mongrel "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default" +if test "x$ac_cv_header_net_if_dl_h" = xyes; then : + HAVE_IF_DL=yes +else + HAVE_IF_DL=no +fi + + + if test "$HAVE_IF_DL" = yes; then + HAVE_IF_DL_TRUE= + HAVE_IF_DL_FALSE='#' +else + HAVE_IF_DL_TRUE='#' + HAVE_IF_DL_FALSE= +fi + + if test "$HAVE_IF_DL" = yes; then + +$as_echo "#define HAVE_IF_DL 1" >>confdefs.h + + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r macro segfaults on some inputs" >&5 $as_echo_n "checking whether strtok_r macro segfaults on some inputs... " >&6; } if ${ovs_cv_strtok_r_bug+:} false; then : @@ -8139,6 +8237,10 @@ as_fn_error $? "conditional \"HAVE_IF_PACKET\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_IF_DL_TRUE}" && test -z "${HAVE_IF_DL_FALSE}"; then + as_fn_error $? "conditional \"HAVE_IF_DL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${USE_LINKER_SECTIONS_TRUE}" && test -z "${USE_LINKER_SECTIONS_FALSE}"; then as_fn_error $? "conditional \"USE_LINKER_SECTIONS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5