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 @@ -618,11 +618,14 @@ AC_DEFUN([APACHE_CHECK_SYSTEMD], [
618618dnl Check for systemd support for listen.c's socket activation.
619619case $host in
620620*-linux-*)
621- if test -n "$PKGCONFIG" && $PKGCONFIG --exists libsystemd; then
622- SYSTEMD_LIBS=`$PKGCONFIG --libs libsystemd`
623- elif test -n "$PKGCONFIG" && $PKGCONFIG --exists libsystemd-daemon; then
624- SYSTEMD_LIBS=`$PKGCONFIG --libs libsystemd-daemon`
625- else
621+ for libsd in libsystemd libsystemd-daemon; do
622+ if test -n "$PKGCONFIG" && $PKGCONFIG --exists $libsd; then
623+ SYSTEMD_LIBS=`$PKGCONFIG --libs $libsd`
624+ SYSTEMD_VERS=`$PKGCONFIG --modversion $libsd`
625+ break
626+ fi
627+ done
628+ if test -n "$SYSTEMD_LIBS"; then
626629 AC_CHECK_LIB ( systemd-daemon , sd_notify , SYSTEMD_LIBS="-lsystemd-daemon" )
627630 fi
628631 if test -n "$SYSTEMD_LIBS"; then
@@ -631,6 +634,10 @@ case $host in
631634 AC_MSG_WARN ( [ Your system does not support systemd.] )
632635 else
633636 AC_DEFINE ( HAVE_SYSTEMD , 1 , [ Define if systemd is supported] )
637+ if test -n "$SYSTEMD_VERS" -a "$SYSTEMD_VERS" -gt 0; then
638+ AC_DEFINE_UNQUOTED ( [ AP_SYSTEMD_VERSION] , [ $SYSTEMD_VERS] ,
639+ [ Define to the systemd version if available] )
640+ fi
634641 fi
635642 fi
636643 ;;
You can’t perform that action at this time.
0 commit comments