76 lines
2.8 KiB
Diff
76 lines
2.8 KiB
Diff
|
diff -uap httpd-2.4.25/acinclude.m4.detectsystemd httpd-2.4.25/acinclude.m4
|
||
|
diff -uap httpd-2.4.25/acinclude.m4.detectsystemd httpd-2.4.25/acinclude.m4
|
||
|
diff -uap httpd-2.4.25/acinclude.m4.detectsystemd httpd-2.4.25/acinclude.m4
|
||
|
--- httpd-2.4.25/acinclude.m4.detectsystemd
|
||
|
+++ httpd-2.4.25/acinclude.m4
|
||
|
@@ -604,6 +604,30 @@
|
||
|
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(HTTPD_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 -uap httpd-2.4.25/configure.in.detectsystemd httpd-2.4.25/configure.in
|
||
|
--- httpd-2.4.25/configure.in.detectsystemd
|
||
|
+++ httpd-2.4.25/configure.in
|
||
|
@@ -234,6 +234,7 @@
|
||
|
AC_MSG_NOTICE([Using external PCRE library from $PCRE_CONFIG])
|
||
|
APR_ADDTO(PCRE_INCLUDES, [`$PCRE_CONFIG --cflags`])
|
||
|
APR_ADDTO(PCRE_LIBS, [`$PCRE_CONFIG --libs`])
|
||
|
+ APR_ADDTO(HTTPD_LIBS, [\$(PCRE_LIBS)])
|
||
|
else
|
||
|
AC_MSG_ERROR([pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/])
|
||
|
fi
|
||
|
@@ -504,6 +510,8 @@
|
||
|
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
|
||
|
@@ -668,6 +676,7 @@
|
||
|
APACHE_SUBST(BUILTIN_LIBS)
|
||
|
APACHE_SUBST(SHLIBPATH_VAR)
|
||
|
APACHE_SUBST(OS_SPECIFIC_VARS)
|
||
|
+APACHE_SUBST(HTTPD_LIBS)
|
||
|
|
||
|
PRE_SHARED_CMDS='echo ""'
|
||
|
POST_SHARED_CMDS='echo ""'
|
||
|
--- httpd-2.4.25/Makefile.in.detectsystemd
|
||
|
+++ httpd-2.4.25/Makefile.in
|
||
|
@@ -4,7 +4,7 @@
|
||
|
|
||
|
PROGRAM_NAME = $(progname)
|
||
|
PROGRAM_SOURCES = modules.c
|
||
|
-PROGRAM_LDADD = buildmark.o $(HTTPD_LDFLAGS) $(PROGRAM_DEPENDENCIES) $(PCRE_LIBS) $(EXTRA_LIBS) $(AP_LIBS) $(LIBS)
|
||
|
+PROGRAM_LDADD = buildmark.o $(HTTPD_LDFLAGS) $(PROGRAM_DEPENDENCIES) $(HTTPD_LIBS) $(EXTRA_LIBS) $(AP_LIBS) $(LIBS)
|
||
|
PROGRAM_PRELINK = $(COMPILE) -c $(top_srcdir)/server/buildmark.c
|
||
|
PROGRAM_DEPENDENCIES = \
|
||
|
server/libmain.la \
|