summaryrefslogtreecommitdiffstats
path: root/acinclude.m4
diff options
context:
space:
mode:
authorJoe Orton <jorton@apache.org>2014-07-31 09:56:44 +0200
committerJoe Orton <jorton@apache.org>2014-07-31 09:56:44 +0200
commitd91f672d4faa4696e9d972c593e3da4ae2a67904 (patch)
tree7eb0f4b0b54ca579e9c2c73a75ca1a65472e6495 /acinclude.m4
parentFix typo spotted in comment #2818 (diff)
downloadapache2-d91f672d4faa4696e9d972c593e3da4ae2a67904.tar.xz
apache2-d91f672d4faa4696e9d972c593e3da4ae2a67904.zip
* configure.in, acinclude.m4: Move systemd check to APACHE_CHECK_SYSTEMD
and use pkg-config where available. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1614821 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m421
1 files changed, 21 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 056bbd5e8b..054433b16b 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -653,6 +653,27 @@ AC_DEFUN([APACHE_CHECK_SERF], [
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-daemon; then
+ SYSTEMD_LIBS=`pkg-config --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