|
|
3fd4d8 |
diff -uap httpd-2.4.25/acinclude.m4.detectsystemd httpd-2.4.25/acinclude.m4
|
|
|
3fd4d8 |
diff -uap httpd-2.4.25/acinclude.m4.detectsystemd httpd-2.4.25/acinclude.m4
|
|
|
3fd4d8 |
diff -uap httpd-2.4.25/acinclude.m4.detectsystemd httpd-2.4.25/acinclude.m4
|
|
|
3fd4d8 |
--- httpd-2.4.25/acinclude.m4.detectsystemd
|
|
|
3fd4d8 |
+++ httpd-2.4.25/acinclude.m4
|
|
|
3fd4d8 |
@@ -604,6 +604,30 @@
|
|
|
3fd4d8 |
fi
|
|
|
3fd4d8 |
])
|
|
|
3fd4d8 |
|
|
|
3fd4d8 |
+AC_DEFUN(APACHE_CHECK_SYSTEMD, [
|
|
|
3fd4d8 |
+dnl Check for systemd support for listen.c's socket activation.
|
|
|
3fd4d8 |
+case $host in
|
|
|
3fd4d8 |
+*-linux-*)
|
|
|
3fd4d8 |
+ if test -n "$PKGCONFIG" && $PKGCONFIG --exists libsystemd; then
|
|
|
3fd4d8 |
+ SYSTEMD_LIBS=`$PKGCONFIG --libs libsystemd`
|
|
|
3fd4d8 |
+ elif test -n "$PKGCONFIG" && $PKGCONFIG --exists libsystemd-daemon; then
|
|
|
3fd4d8 |
+ SYSTEMD_LIBS=`$PKGCONFIG --libs libsystemd-daemon`
|
|
|
3fd4d8 |
+ else
|
|
|
3fd4d8 |
+ AC_CHECK_LIB(systemd-daemon, sd_notify, SYSTEMD_LIBS="-lsystemd-daemon")
|
|
|
3fd4d8 |
+ fi
|
|
|
3fd4d8 |
+ if test -n "$SYSTEMD_LIBS"; then
|
|
|
3fd4d8 |
+ AC_CHECK_HEADERS(systemd/sd-daemon.h)
|
|
|
3fd4d8 |
+ if test "${ac_cv_header_systemd_sd_daemon_h}" = "no" || test -z "${SYSTEMD_LIBS}"; then
|
|
|
3fd4d8 |
+ AC_MSG_WARN([Your system does not support systemd.])
|
|
|
3fd4d8 |
+ else
|
|
|
3fd4d8 |
+ APR_ADDTO(HTTPD_LIBS, [$SYSTEMD_LIBS])
|
|
|
3fd4d8 |
+ AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd is supported])
|
|
|
3fd4d8 |
+ fi
|
|
|
3fd4d8 |
+ fi
|
|
|
3fd4d8 |
+ ;;
|
|
|
3fd4d8 |
+esac
|
|
|
3fd4d8 |
+])
|
|
|
3fd4d8 |
+
|
|
|
3fd4d8 |
dnl
|
|
|
3fd4d8 |
dnl APACHE_EXPORT_ARGUMENTS
|
|
|
3fd4d8 |
dnl Export (via APACHE_SUBST) the various path-related variables that
|
|
|
3fd4d8 |
diff -uap httpd-2.4.25/configure.in.detectsystemd httpd-2.4.25/configure.in
|
|
|
3fd4d8 |
--- httpd-2.4.25/configure.in.detectsystemd
|
|
|
3fd4d8 |
+++ httpd-2.4.25/configure.in
|
|
|
3fd4d8 |
@@ -234,6 +234,7 @@
|
|
|
3fd4d8 |
AC_MSG_NOTICE([Using external PCRE library from $PCRE_CONFIG])
|
|
|
3fd4d8 |
APR_ADDTO(PCRE_INCLUDES, [`$PCRE_CONFIG --cflags`])
|
|
|
3fd4d8 |
APR_ADDTO(PCRE_LIBS, [`$PCRE_CONFIG --libs`])
|
|
|
3fd4d8 |
+ APR_ADDTO(HTTPD_LIBS, [\$(PCRE_LIBS)])
|
|
|
3fd4d8 |
else
|
|
|
3fd4d8 |
AC_MSG_ERROR([pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/])
|
|
|
3fd4d8 |
fi
|
|
|
3fd4d8 |
@@ -504,6 +510,8 @@
|
|
|
3fd4d8 |
AC_DEFINE(HAVE_GMTOFF, 1, [Define if struct tm has a tm_gmtoff field])
|
|
|
3fd4d8 |
fi
|
|
|
3fd4d8 |
|
|
|
3fd4d8 |
+APACHE_CHECK_SYSTEMD
|
|
|
3fd4d8 |
+
|
|
|
3fd4d8 |
dnl ## Set up any appropriate OS-specific environment variables for apachectl
|
|
|
3fd4d8 |
|
|
|
3fd4d8 |
case $host in
|
|
|
3fd4d8 |
@@ -668,6 +676,7 @@
|
|
|
3fd4d8 |
APACHE_SUBST(BUILTIN_LIBS)
|
|
|
3fd4d8 |
APACHE_SUBST(SHLIBPATH_VAR)
|
|
|
3fd4d8 |
APACHE_SUBST(OS_SPECIFIC_VARS)
|
|
|
3fd4d8 |
+APACHE_SUBST(HTTPD_LIBS)
|
|
|
3fd4d8 |
|
|
|
3fd4d8 |
PRE_SHARED_CMDS='echo ""'
|
|
|
3fd4d8 |
POST_SHARED_CMDS='echo ""'
|
|
|
3fd4d8 |
--- httpd-2.4.25/Makefile.in.detectsystemd
|
|
|
3fd4d8 |
+++ httpd-2.4.25/Makefile.in
|
|
|
3fd4d8 |
@@ -4,7 +4,7 @@
|
|
|
3fd4d8 |
|
|
|
3fd4d8 |
PROGRAM_NAME = $(progname)
|
|
|
3fd4d8 |
PROGRAM_SOURCES = modules.c
|
|
|
3fd4d8 |
-PROGRAM_LDADD = buildmark.o $(HTTPD_LDFLAGS) $(PROGRAM_DEPENDENCIES) $(PCRE_LIBS) $(EXTRA_LIBS) $(AP_LIBS) $(LIBS)
|
|
|
3fd4d8 |
+PROGRAM_LDADD = buildmark.o $(HTTPD_LDFLAGS) $(PROGRAM_DEPENDENCIES) $(HTTPD_LIBS) $(EXTRA_LIBS) $(AP_LIBS) $(LIBS)
|
|
|
3fd4d8 |
PROGRAM_PRELINK = $(COMPILE) -c $(top_srcdir)/server/buildmark.c
|
|
|
3fd4d8 |
PROGRAM_DEPENDENCIES = \
|
|
|
3fd4d8 |
server/libmain.la \
|