summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorRemi Collet <remi@php.net>2014-07-20 11:14:43 +0200
committerRemi Collet <remi@php.net>2014-07-20 11:14:43 +0200
commit658f7d77f9eb447ecc2f9812d46b4c07bb99b16d (patch)
tree286219666c71acb53e428b914e49c1f9ce8f3c63 /sapi
parenta051d7264dc5c21264e1244785d962ee1256874b (diff)
downloadphp-git-658f7d77f9eb447ecc2f9812d46b4c07bb99b16d.tar.gz
See bug #67635
Improve previous fix: - also rely on pkg-config for systemd < 209 - always check for header - comments
Diffstat (limited to 'sapi')
-rw-r--r--sapi/fpm/config.m416
1 files changed, 14 insertions, 2 deletions
diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4
index 96b0edf7fa..6db5e3b955 100644
--- a/sapi/fpm/config.m4
+++ b/sapi/fpm/config.m4
@@ -572,17 +572,29 @@ if test "$PHP_FPM" != "no"; then
fi
unset SYSTEMD_LIBS
unset SYSTEMD_INCS
+
if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libsystemd; then
+ dnl systemd version >= 209 provides libsystemd
AC_MSG_CHECKING([for libsystemd])
SYSTEMD_LIBS=`$PKG_CONFIG --libs libsystemd`
SYSTEMD_INCS=`$PKG_CONFIG --cflags-only-I libsystemd`
SYSTEMD_VERS=`$PKG_CONFIG --modversion libsystemd`
- HAVE_SD_DAEMON_H="yes"
AC_MSG_RESULT([version $SYSTEMD_VERS])
+
+ elif test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libsystemd-daemon; then
+ dnl systemd version < 209 provides libsystemd-daemon
+ AC_MSG_CHECKING([for libsystemd-daemon])
+ SYSTEMD_LIBS=`$PKG_CONFIG --libs libsystemd-daemon`
+ SYSTEMD_INCS=`$PKG_CONFIG --cflags-only-I libsystemd-daemon`
+ SYSTEMD_VERS=`$PKG_CONFIG --modversion libsystemd-daemon`
+ AC_MSG_RESULT([version $SYSTEMD_VERS])
+
else
+ dnl failback when no pkg-config
AC_CHECK_LIB(systemd-daemon, sd_notify, SYSTEMD_LIBS="-lsystemd-daemon")
- AC_CHECK_HEADERS(systemd/sd-daemon.h, [HAVE_SD_DAEMON_H="yes"], [HAVE_SD_DAEMON_H="no"])
fi
+
+ AC_CHECK_HEADERS(systemd/sd-daemon.h, [HAVE_SD_DAEMON_H="yes"], [HAVE_SD_DAEMON_H="no"])
if test $HAVE_SD_DAEMON_H = "no" || test -z "${SYSTEMD_LIBS}"; then
AC_MSG_ERROR([Your system does not support systemd.])
else