summaryrefslogtreecommitdiffstats
path: root/httpd-2.4.10-detect-systemd.patch
diff options
context:
space:
mode:
Diffstat (limited to 'httpd-2.4.10-detect-systemd.patch')
-rw-r--r--httpd-2.4.10-detect-systemd.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/httpd-2.4.10-detect-systemd.patch b/httpd-2.4.10-detect-systemd.patch
new file mode 100644
index 0000000..a22178b
--- /dev/null
+++ b/httpd-2.4.10-detect-systemd.patch
@@ -0,0 +1,48 @@
+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-daemon, sd_notify, SYSTEMD_LIBS="-lsystemd-daemon")
++ 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