From: Kristof Provost Date: Wed, 1 Mar 2023 09:18:48 +0000 (+0100) Subject: configure: improve FreeBSD DCO check X-Git-Tag: v2.7_alpha1~535 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6f261673dee26ae8cfdf58f77038098d4f81d84a;p=thirdparty%2Fopenvpn.git configure: improve FreeBSD DCO check The libnv check doesn't work as expected on FreeBSD 14.x, because FreeBSD has namespaced libnv to avoid conflicts with libnvpair. This means that the naive check generated by AC_CHECK_LIB() fails to detect libnv even though it's present. Instead check for the if_ovpn.h header. This is a more accurate check anyway, as libnv is present on FreeBSD versions prior to 14 (which do not support DCO). Signed-off-by: Kristof Provost Acked-by: Gert Doering Message-Id: <20230301091848.80760-1-kprovost@netgate.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26314.html Signed-off-by: Gert Doering --- diff --git a/configure.ac b/configure.ac index 4c271464b..67f680b28 100644 --- a/configure.ac +++ b/configure.ac @@ -832,9 +832,7 @@ if test "$enable_dco" != "no"; then fi ;; *-*-freebsd*) - AC_CHECK_LIB( - [nv], - [nvlist_create], + AC_CHECK_HEADERS([net/if_ovpn.h], [ LIBS="${LIBS} -lnv" AC_DEFINE(ENABLE_DCO, 1, [Enable data channel offload for FreeBSD]) @@ -842,7 +840,7 @@ if test "$enable_dco" != "no"; then ], [ enable_dco="no" - AC_MSG_WARN([Name/Value pair library not found.]) + AC_MSG_WARN([DCO header not found.]) ] ) if test "$enable_dco" = "no"; then