File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -819,11 +819,14 @@ AC_DEFUN([APACHE_CHECK_SYSTEMD], [
819819dnl Check for systemd support for listen.c's socket activation.
820820case $host in
821821*-linux-*)
822- if test -n "$PKGCONFIG" && $PKGCONFIG --exists libsystemd; then
823- SYSTEMD_LIBS=`$PKGCONFIG --libs libsystemd`
824- elif test -n "$PKGCONFIG" && $PKGCONFIG --exists libsystemd-daemon; then
825- SYSTEMD_LIBS=`$PKGCONFIG --libs libsystemd-daemon`
826- else
822+ for libsd in libsystemd libsystemd-daemon; do
823+ if test -n "$PKGCONFIG" && $PKGCONFIG --exists $libsd; then
824+ SYSTEMD_LIBS=`$PKGCONFIG --libs $libsd`
825+ SYSTEMD_VERS=`$PKGCONFIG --modversion $libsd`
826+ break
827+ fi
828+ done
829+ if test -n "$SYSTEMD_LIBS"; then
827830 AC_CHECK_LIB ( systemd-daemon , sd_notify , SYSTEMD_LIBS="-lsystemd-daemon" )
828831 fi
829832 if test -n "$SYSTEMD_LIBS"; then
@@ -832,6 +835,10 @@ case $host in
832835 AC_MSG_WARN ( [ Your system does not support systemd.] )
833836 else
834837 AC_DEFINE ( HAVE_SYSTEMD , 1 , [ Define if systemd is supported] )
838+ if test -n "$SYSTEMD_VERS" -a "$SYSTEMD_VERS" -gt 0; then
839+ AC_DEFINE_UNQUOTED ( [ AP_SYSTEMD_VERSION] , [ $SYSTEMD_VERS] ,
840+ [ Define to the systemd version if available] )
841+ fi
835842 fi
836843 fi
837844 ;;
You can’t perform that action at this time.
0 commit comments