--- nono/configure.ac 2026/04/29 17:04:48 1.1.1.6 +++ nono/configure.ac 2026/04/29 17:04:53 1.1.1.8 @@ -60,7 +60,6 @@ AC_DEFUN([ADD_CC_WARN_IF],[ CFLAGS="${old_CFLAGS}" ]) ADD_CC_WARN_IF(-Wcast-qual) -ADD_CC_WARN_IF(-Wdisabled-macro-expansion) ADD_CC_WARN_IF(-Wextra-semi) ADD_CC_WARN_IF(-Wlogical-op) ADD_CC_WARN_IF(-Wmissing-prototypes) @@ -82,7 +81,6 @@ AC_DEFUN([ADD_CXX_WARN_IF],[ CXXFLAGS="${old_CXXFLAGS}" ]) ADD_CXX_WARN_IF(-Wcast-qual) -ADD_CXX_WARN_IF(-Wdisabled-macro-expansion) ADD_CXX_WARN_IF(-Wextra-semi) ADD_CXX_WARN_IF(-Winconsistent-missing-override) ADD_CXX_WARN_IF(-Winconsistent-missing-destructor-override) @@ -111,7 +109,7 @@ case "${host_os}" in linux*) if test "$ac_cv_header_kqueue_sys_event_h" != "yes"; then AC_MSG_ERROR([*** kqueue is not found. - On Ubuntu, sudo apt install libkqueue-dev]) +*** If you use Ubuntu, sudo apt install libkqueue-dev]) fi ;; esac @@ -387,30 +385,54 @@ AC_TRY_COMPILE( AC_DEFINE([HAVE_ICONV_CONST]), AC_MSG_RESULT([no])) -# Select host network driver. -AC_MSG_CHECKING(for suitable host network driver) +# +# Network +# +AC_MSG_CHECKING(for AF_PACKET) +AC_TRY_COMPILE( + [ + #include + ], [ + AF_PACKET; + ], + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_HOSTNET_AFPACKET]) + AC_SUBST([HOSTNET_AFPACKET], [yes]), + AC_MSG_RESULT([no])) + +AC_MSG_CHECKING(for tap(4)) 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 + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_HOSTNET_TAP]) + AC_SUBST([HOSTNET_TAP], [yes]) +else + AC_MSG_RESULT([no]) +fi + +AC_MSG_CHECKING(for bpf(4)) +if test x"$ac_cv_header_net_bpf_h" = xyes; then + AC_MSG_RESULT([yes]) + AC_DEFINE([HAVE_HOSTNET_BPF]) + AC_SUBST([HOSTNET_BPF], [yes]) +else + AC_MSG_RESULT([no]) fi -AC_MSG_RESULT([$netdriver]) -AC_SUBST([NETDRIVER], [$netdriver]) # libbsd on Linux AC_CHECK_LIB(c, getprogname, ,) @@ -430,7 +452,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM( ])], # nothing to do on success , [AC_MSG_ERROR([*** getprogname is not found. - On Ubuntu, sudo apt install libbsd-dev]) +*** If you use Ubuntu, sudo apt install libbsd-dev]) ] ) @@ -447,7 +469,7 @@ AC_CHECK_LIB(kqueue, kqueue, AC_CHECK_LIB(z, gzclose, LIBS="${LIBS} -lz", [AC_MSG_ERROR([*** zlib is not found. - On Ubuntu, sudo apt install zlib1g-dev])] +*** If use use Ubuntu, sudo apt install zlib1g-dev])] ) # wxWidgets @@ -462,7 +484,9 @@ for c in ${wxconfig_paths}; do fi done if test -z "$wxconfig"; then - AC_MSG_ERROR([*** wxWidgets-3.0 not found in ${wxconfig_paths}]) + AC_MSG_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]) else AC_MSG_RESULT([$wxconfig]) @@ -493,7 +517,8 @@ fi AC_CHECK_TOOL([MSGFMT], [msgfmt], [:]) if test $MSGFMT = [:]; then AC_MSG_ERROR([*** msgfmt not found. - On Ubuntu, sudo apt install gettext]) +*** If you use pkgsrc, install devel/gettext-tools. +*** If you use Ubuntu, sudo apt install gettext]) fi AC_CONFIG_FILES([Makefile.cfg