This option can be used in FreedBSD with devel/libinotify installed. Detect presence of libinotify and link with its _LIBS variable.
Trac #1256 Signed-off-by: Lev Stipakov <lstipa...@gmail.com> --- v2: use PKG_CHECK_MODULES instead of hardcoded -linotify configure.ac | 9 +++++++++ src/openvpn/Makefile.am | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a47ef3e7..085e7b69 100644 --- a/configure.ac +++ b/configure.ac @@ -1344,6 +1344,14 @@ if test "${enable_async_push}" = "yes"; then AC_DEFINE([ENABLE_ASYNC_PUSH], [1], [Enable async push]), AC_MSG_ERROR([inotify.h not found.]) ) + case "$host" in + *-*-freebsd*) + PKG_CHECK_MODULES( + [OPTIONAL_INOTIFY], + [libinotify] + ) + ;; + esac fi CONFIGURE_DEFINES="`set | grep '^enable_.*=' ; set | grep '^with_.*='`" @@ -1370,6 +1378,7 @@ AC_SUBST([OPTIONAL_LZ4_LIBS]) AC_SUBST([OPTIONAL_SYSTEMD_LIBS]) AC_SUBST([OPTIONAL_PKCS11_HELPER_CFLAGS]) AC_SUBST([OPTIONAL_PKCS11_HELPER_LIBS]) +AC_SUBST([OPTIONAL_INOTIFY_LIBS]) AC_SUBST([PLUGIN_AUTH_PAM_CFLAGS]) AC_SUBST([PLUGIN_AUTH_PAM_LIBS]) diff --git a/src/openvpn/Makefile.am b/src/openvpn/Makefile.am index 2ea47cda..b924014d 100644 --- a/src/openvpn/Makefile.am +++ b/src/openvpn/Makefile.am @@ -137,7 +137,8 @@ openvpn_LDADD = \ $(OPTIONAL_CRYPTO_LIBS) \ $(OPTIONAL_SELINUX_LIBS) \ $(OPTIONAL_SYSTEMD_LIBS) \ - $(OPTIONAL_DL_LIBS) + $(OPTIONAL_DL_LIBS) \ + $(OPTIONAL_INOTIFY_LIBS) if WIN32 openvpn_SOURCES += openvpn_win32_resources.rc block_dns.c block_dns.h ring_buffer.c ring_buffer.h openvpn_LDADD += -lgdi32 -lws2_32 -lwininet -lcrypt32 -liphlpapi -lwinmm -lfwpuclnt -lrpcrt4 -lncrypt -lsetupapi -- 2.17.1 _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel