--- nono/configure 2026/04/29 17:04:51 1.1.1.7 +++ nono/configure 2026/04/29 17:04:53 1.1.1.8 @@ -624,7 +624,9 @@ LIBOBJS MSGFMT WXWIDGETS_LIBS WXWIDGETS_CPPFLAGS -NETDRIVER +HOSTNET_BPF +HOSTNET_TAP +HOSTNET_AFPACKET KEVENT_UDATA_T CXXCPP WARNFLAGS_CXX @@ -5406,33 +5408,82 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Select host network driver. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suitable host network driver" >&5 -$as_echo_n "checking for suitable host network driver... " >&6; } +# +# Network +# +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AF_PACKET" >&5 +$as_echo_n "checking for AF_PACKET... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + +int +main () +{ + + AF_PACKET; + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define HAVE_HOSTNET_AFPACKET 1" >>confdefs.h + + HOSTNET_AFPACKET=yes + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tap(4)" >&5 +$as_echo_n "checking for tap(4)... " >&6; } case "${host_os}" in linux*) if test x"$ac_cv_header_linux_if_tun_h" = xyes; then - netdriver=tap + netdriver_tap=yes fi ;; openbsd*) # OpenBSD has no but supports tap(4). - netdriver=tap + netdriver_tap=yes ;; -esac -if test -z "$netdriver"; then + *) if test x"$ac_cv_header_net_if_tap_h" = xyes; then - netdriver=tap - elif test x"$ac_cv_header_net_bpf_h" = xyes; then - netdriver=bpf - else - netdriver=none + netdriver_tap=yes fi + ;; +esac +if test x"$netdriver_tap" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define HAVE_HOSTNET_TAP 1" >>confdefs.h + + HOSTNET_TAP=yes + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $netdriver" >&5 -$as_echo "$netdriver" >&6; } -NETDRIVER=$netdriver +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for bpf(4)" >&5 +$as_echo_n "checking for bpf(4)... " >&6; } +if test x"$ac_cv_header_net_bpf_h" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + $as_echo "#define HAVE_HOSTNET_BPF 1" >>confdefs.h + + HOSTNET_BPF=yes + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi # libbsd on Linux { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getprogname in -lc" >&5