From: Matthew Newton Date: Thu, 28 Feb 2019 13:29:17 +0000 (+0000) Subject: Fix up the systemd configure checks and backport the missing bits X-Git-Tag: release_3_0_19~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=107b8352adca1d634d4e2c8bc1692d3b6438e901;p=thirdparty%2Ffreeradius-server.git Fix up the systemd configure checks and backport the missing bits --- diff --git a/configure.ac b/configure.ac index 8c3c23b55b7..1598ff5bf98 100644 --- a/configure.ac +++ b/configure.ac @@ -990,28 +990,47 @@ dnl # VL_LIB_READLINE dnl # -dnl # Check for libsystemd +dnl # Checks for systemd +dnl # +dnl # extra argument: --with-systemd dnl # -libsystemd_ver="221" AC_ARG_WITH([systemd], - AS_HELP_STRING([--with-systemd], [Enable use of libsystemd for journal output]), - [with_libsystemd=$enableval], - [with_libsystemd=auto]) - -AS_IF([test x$with_libsystemd != xno], [ - AC_MSG_CHECKING([for libsystemd]) - PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= ${libsystemd_ver}], - [WITH_SYSTEMD=yes], - [WITH_SYSTEMD=no]) - AC_MSG_RESULT($WITH_SYSTEMD) -]) - -AC_MSG_RESULT($with_libsystemd) - + AS_HELP_STRING([--with-systemd], [add systemd support, if available (default=no)]), + [ case "$withval" in + no) + WITH_SYSTEMD=no + ;; + *) + WITH_SYSTEMD=yes + esac ], + [WITH_SYSTEMD=no]) + +dnl # +dnl # extra argument: --systemd-lib-dir=dir +dnl # +systemd_lib_dir= +AC_ARG_WITH(systemd-lib-dir, + [AS_HELP_STRING([--with-systemd-lib-dir=DIR], + [directory to look for systemd library files])], + [ case "$withval" in + *) systemd_lib_dir="$withval" + ;; + esac ] +) dnl # -dnl # Check for systemd +dnl # extra argument: --with-systemd-includes=dir dnl # +systemd_include_dir= +AC_ARG_WITH(systemd-include-dir, + [AS_HELP_STRING([--with-systemd-include-dir=DIR], + [directory to look for systemd include files])], + [ case "$withval" in + *) systemd_include_dir="$withval" + ;; + esac ] +) + if test "x$WITH_SYSTEMD" = xyes; then smart_try_dir="$systemd_lib_dir" FR_SMART_CHECK_LIB(systemd, sd_notify)