summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--acinclude.m421
-rw-r--r--configure.in13
2 files changed, 22 insertions, 12 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
diff --git a/configure.in b/configure.in
index 32a7090e9c..55e5e32060 100644
--- a/configure.in
+++ b/configure.in
@@ -531,18 +531,7 @@ if test "$ac_cv_struct_tm_gmtoff" = "yes"; then
AC_DEFINE(HAVE_GMTOFF, 1, [Define if struct tm has a tm_gmtoff field])
fi
-dnl Check for systemd support for listen.c's socket activation.
-case $host in
-*-linux-*)
- AC_CHECK_LIB(systemd-daemon, sd_notify, SYSTEMD_LIBS="-lsystemd-daemon")
- 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
-esac
+APACHE_CHECK_SYSTEMD
dnl ## Set up any appropriate OS-specific environment variables for apachectl