--- nono/configure 2026/04/29 17:04:48 1.1.1.6 +++ nono/configure 2026/04/29 17:05:04 1.1.1.9 @@ -624,8 +624,9 @@ LIBOBJS MSGFMT WXWIDGETS_LIBS WXWIDGETS_CPPFLAGS -NETDRIVER -KEVENT_UDATA_T +HOSTNET_BPF +HOSTNET_TAP +HOSTNET_AFPACKET CXXCPP WARNFLAGS_CXX WARNFLAGS_C @@ -4135,33 +4136,6 @@ rm -f core conftest.err conftest.$ac_obj CFLAGS="${old_CFLAGS}" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc accepts -Wdisabled-macro-expansion" >&5 -$as_echo_n "checking whether cc accepts -Wdisabled-macro-expansion... " >&6; } - old_CFLAGS="${CFLAGS}" - CFLAGS="${CFLAGS} -Werror -Wdisabled-macro-expansion" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - WARNFLAGS_C="${WARNFLAGS_C} -Wdisabled-macro-expansion" -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 - CFLAGS="${old_CFLAGS}" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc accepts -Wextra-semi" >&5 $as_echo_n "checking whether cc accepts -Wextra-semi... " >&6; } old_CFLAGS="${CFLAGS}" @@ -4314,33 +4288,6 @@ rm -f core conftest.err conftest.$ac_obj CXXFLAGS="${old_CXXFLAGS}" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether c++ accepts -Wdisabled-macro-expansion" >&5 -$as_echo_n "checking whether c++ accepts -Wdisabled-macro-expansion... " >&6; } - old_CXXFLAGS="${CXXFLAGS}" - CXXFLAGS="${CXXFLAGS} -Werror -Wdisabled-macro-expansion" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - 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; } - WARNFLAGS_CXX="${WARNFLAGS_CXX} -Wdisabled-macro-expansion" -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 - CXXFLAGS="${old_CXXFLAGS}" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether c++ accepts -Wextra-semi" >&5 $as_echo_n "checking whether c++ accepts -Wextra-semi... " >&6; } old_CXXFLAGS="${CXXFLAGS}" @@ -4794,7 +4741,7 @@ case "${host_os}" in linux*) if test "$ac_cv_header_kqueue_sys_event_h" != "yes"; then as_fn_error $? "*** kqueue is not found. - On Ubuntu, sudo apt install libkqueue-dev" "$LINENO" 5 +*** If you use Ubuntu, sudo apt install libkqueue-dev" "$LINENO" 5 fi ;; esac @@ -4898,99 +4845,6 @@ fi #AC_TYPE_UINT64_T #AC_TYPE_UINT8_T -# struct kevent のメンバ udata の型が互換性なく違う。 -# NetBSD では intptr_t(整数) だが、OSX では void* (ポインタ) なので、 -# 同一ソースコードでは回避できない。 -# Linux(Ubuntu) はどっちもパスするので後ろの void * のほうが使われる。 -# まあパスするんならどっちでもいいか。 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kevent.udata is intptr_t" >&5 -$as_echo_n "checking whether kevent.udata is intptr_t... " >&6; } -old_CXXFLAGS="${CXXFLAGS}" -CXXFLAGS="${CXXFLAGS} -Wall -Werror" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include "confdefs.h" - #if defined(HAVE_SYS_TYPES_H) - #include - #endif - #if defined(HAVE_SYS_EVENT_H) - #include - #endif - #if defined(HAVE_KQUEUE_SYS_EVENT_H) - #include - #endif - -int -main () -{ - - struct kevent kev; - kev.udata = (intptr_t)0; - (void)kev; - - ; - 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; } - KEVENT_UDATA_T=intptr_t - -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 -CXXFLAGS="${old_CXXFLAGS}" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kevent.udata is void *" >&5 -$as_echo_n "checking whether kevent.udata is void *... " >&6; } -old_CXXFLAGS="${CXXFLAGS}" -CXXFLAGS="${CXXFLAGS} -Wall -Werror" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include "confdefs.h" - #if defined(HAVE_SYS_TYPES_H) - #include - #endif - #if defined(HAVE_SYS_EVENT_H) - #include - #endif - #if defined(HAVE_KQUEUE_SYS_EVENT_H) - #include - #endif - -int -main () -{ - - struct kevent kev; - kev.udata = (void *)0; - (void)kev; - - ; - 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; } - KEVENT_UDATA_T='void *' - -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 -CXXFLAGS="${old_CXXFLAGS}" - -if test -z "$KEVENT_UDATA_T" ; then - as_fn_error $? "kevent.udata is unknown type" "$LINENO" 5 -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_assume" >&5 $as_echo_n "checking for __builtin_assume... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5460,33 +5314,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 @@ -5600,7 +5503,7 @@ if ac_fn_cxx_try_compile "$LINENO"; then else as_fn_error $? "*** getprogname is not found. - On Ubuntu, sudo apt install libbsd-dev" "$LINENO" 5 +*** If you use Ubuntu, sudo apt install libbsd-dev" "$LINENO" 5 fi @@ -5694,7 +5597,7 @@ if test "x$ac_cv_lib_z_gzclose" = xyes; LIBS="${LIBS} -lz" else as_fn_error $? "*** zlib is not found. - On Ubuntu, sudo apt install zlib1g-dev" "$LINENO" 5 +*** If use use Ubuntu, sudo apt install zlib1g-dev" "$LINENO" 5 fi @@ -5712,7 +5615,9 @@ for c in ${wxconfig_paths}; do fi done if test -z "$wxconfig"; then - as_fn_error $? "*** wxWidgets-3.0 not found in ${wxconfig_paths}" "$LINENO" 5 + as_fn_error $? "*** wxWidgets-3.0 not found in ${wxconfig_paths} +*** If you use pkgsrc, install x11/wxGTK30. +*** If you use Ubuntu, sudo apt install libwxgtk3.0-gtk3-dev" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $wxconfig" >&5 $as_echo "$wxconfig" >&6; } @@ -5839,7 +5744,8 @@ fi if test $MSGFMT = :; then as_fn_error $? "*** msgfmt not found. - On Ubuntu, sudo apt install gettext" "$LINENO" 5 +*** If you use pkgsrc, install devel/gettext-tools. +*** If you use Ubuntu, sudo apt install gettext" "$LINENO" 5 fi ac_config_files="$ac_config_files Makefile.cfg host/Makefile wx/Makefile util/mkcgrom/Makefile util/viewcgrom/Makefile"