suricata: add sd_notify support

Upon all threads reaching a running state the system generates
a notification for systems running and configured for systemd

Implements feature 5384
(https://redmine.openinfosecfoundation.org/issues/5384)
pull/8097/head
Richard McConnell 2 years ago committed by Victor Julien
parent 13beba141c
commit 88b98a54df

@ -607,6 +607,35 @@
AC_MSG_RESULT(no)
fi
#systemd
AC_ARG_WITH(systemd_includes,
[ --with-systemd-includes=DIR systemd include directory],
[with_systemd_includes="$withval"],[with_systemd_includes=no])
AC_ARG_WITH(systemd_libraries,
[ --with-systemd-libraries=DIR systemd library directory],
[with_systemd_libraries="$withval"],[with_systemd_libraries="no"])
AC_CHECK_HEADER(systemd/sd-daemon.h, SYSTEMD="yes",SYSTEMD="no")
if test "$SYSTEMD" = "yes"; then
if test "$with_systemd_libraries" != "no"; then
LDFLAGS="${LDFLAGS} -L${with_systemd_libraries}"
fi
if test "$with_systemd_includes" != "no"; then
CPPFLAGS="${CPPFLAGS} -I${with_systems_includes}"
fi
# To prevent duping the lib link we reset LIBS after this check. Setting action-if-found to NULL doesn't seem to work
# see: http://blog.flameeyes.eu/2008/04/29/i-consider-ac_check_lib-harmful
SYSTEMD=""
TMPLIBS="${LIBS}"
AC_CHECK_LIB(systemd,sd_notify,,SYSTEMD="no")
if test "$SYSTEMD" != "no"; then
LIBS="${TMPLIBS} -lsystemd"
fi
fi
# libhs
enable_hyperscan="no"

Loading…
Cancel
Save