Sophie

Sophie

distrib > Mageia > 6 > x86_64 > by-pkgid > e62927c483b065353208eec7db8b3f51 > files > 11

apache-2.4.27-1.mga6.src.rpm

diff --git a/acinclude.m4 b/acinclude.m4
index 580eb4a..bd7e2c9 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -594,6 +594,30 @@ AC_DEFUN(APACHE_CHECK_OPENSSL,[
   fi
 ])
 
+AC_DEFUN(APACHE_CHECK_SYSTEMD, [
+dnl Check for systemd support for listen.c's socket activation.
+case $host in
+*-linux-*)
+   if test -n "$PKGCONFIG" && $PKGCONFIG --exists libsystemd; then
+      SYSTEMD_LIBS=`$PKGCONFIG --libs libsystemd`
+   elif test -n "$PKGCONFIG" && $PKGCONFIG --exists libsystemd-daemon; then
+      SYSTEMD_LIBS=`$PKGCONFIG --libs libsystemd-daemon`
+   else
+      AC_CHECK_LIB(systemd, sd_notify, SYSTEMD_LIBS="-lsystemd")
+   fi
+   if test -n "$SYSTEMD_LIBS"; then
+      AC_CHECK_HEADERS(systemd/sd-daemon.h)
+      if test "${ac_cv_header_systemd_sd_daemon_h}" = "no" || test -z "${SYSTEMD_LIBS}"; then
+        AC_MSG_WARN([Your system does not support systemd.])
+      else
+        APR_ADDTO(LIBS, [$SYSTEMD_LIBS])
+        AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd is supported])
+      fi
+   fi
+   ;;
+esac
+])
+
 dnl
 dnl APACHE_EXPORT_ARGUMENTS
 dnl Export (via APACHE_SUBST) the various path-related variables that
diff --git a/configure.in b/configure.in
index 19a5f88..f096de3 100644
--- a/configure.in
+++ b/configure.in
@@ -509,6 +509,8 @@ if test "$ac_cv_struct_tm_gmtoff" = "yes"; then
     AC_DEFINE(HAVE_GMTOFF, 1, [Define if struct tm has a tm_gmtoff field])
 fi
 
+APACHE_CHECK_SYSTEMD
+
 dnl ## Set up any appropriate OS-specific environment variables for apachectl
 
 case $host in