]> Raphaƫl G. Git Repositories - ihttpd/blob - SOURCES/httpd-2.4.10-detect-systemd.patch
Update to new version
[ihttpd] / SOURCES / httpd-2.4.10-detect-systemd.patch
1 diff --git a/acinclude.m4 b/acinclude.m4
2 index 580eb4a..bd7e2c9 100644
3 --- a/acinclude.m4
4 +++ b/acinclude.m4
5 @@ -594,6 +594,30 @@ AC_DEFUN(APACHE_CHECK_OPENSSL,[
6 fi
7 ])
8
9 +AC_DEFUN(APACHE_CHECK_SYSTEMD, [
10 +dnl Check for systemd support for listen.c's socket activation.
11 +case $host in
12 +*-linux-*)
13 + if test -n "$PKGCONFIG" && $PKGCONFIG --exists libsystemd; then
14 + SYSTEMD_LIBS=`$PKGCONFIG --libs libsystemd`
15 + elif test -n "$PKGCONFIG" && $PKGCONFIG --exists libsystemd-daemon; then
16 + SYSTEMD_LIBS=`$PKGCONFIG --libs libsystemd-daemon`
17 + else
18 + AC_CHECK_LIB(systemd-daemon, sd_notify, SYSTEMD_LIBS="-lsystemd-daemon")
19 + fi
20 + if test -n "$SYSTEMD_LIBS"; then
21 + AC_CHECK_HEADERS(systemd/sd-daemon.h)
22 + if test "${ac_cv_header_systemd_sd_daemon_h}" = "no" || test -z "${SYSTEMD_LIBS}"; then
23 + AC_MSG_WARN([Your system does not support systemd.])
24 + else
25 + APR_ADDTO(LIBS, [$SYSTEMD_LIBS])
26 + AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd is supported])
27 + fi
28 + fi
29 + ;;
30 +esac
31 +])
32 +
33 dnl
34 dnl APACHE_EXPORT_ARGUMENTS
35 dnl Export (via APACHE_SUBST) the various path-related variables that
36 diff --git a/configure.in b/configure.in
37 index 19a5f88..f096de3 100644
38 --- a/configure.in
39 +++ b/configure.in
40 @@ -509,6 +509,8 @@ if test "$ac_cv_struct_tm_gmtoff" = "yes"; then
41 AC_DEFINE(HAVE_GMTOFF, 1, [Define if struct tm has a tm_gmtoff field])
42 fi
43
44 +APACHE_CHECK_SYSTEMD
45 +
46 dnl ## Set up any appropriate OS-specific environment variables for apachectl
47
48 case $host in