diff options
Diffstat (limited to 'php-5.4.38-systemd.patch')
-rw-r--r-- | php-5.4.38-systemd.patch | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/php-5.4.38-systemd.patch b/php-5.4.38-systemd.patch new file mode 100644 index 0000000..4e8ff0f --- /dev/null +++ b/php-5.4.38-systemd.patch @@ -0,0 +1,80 @@ +From 7b6031567251ad47132de23f47eb57951fd9b563 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@php.net> +Date: Sat, 19 Jul 2014 18:40:20 +0200 +Subject: [PATCH] Fixed bug #67635 php links to systemd libraries without using + pkg-config + +Patch from pacho at gentoo dot org + +Rely on pkg-config for systemd >= 209 +Failback on old check +--- + sapi/fpm/config.m4 | 18 +++++++++++++++--- + 1 file changed, 15 insertions(+), 3 deletions(-) + +diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4 +index bd6d649..e1c740d 100644 +--- a/sapi/fpm/config.m4 ++++ b/sapi/fpm/config.m4 +@@ -567,14 +567,26 @@ if test "$PHP_FPM" != "no"; then + [ --with-fpm-systemd Activate systemd integration], no, no) + + if test "$PHP_FPM_SYSTEMD" != "no" ; then +- 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"]) ++ if test -z "$PKG_CONFIG"; then ++ AC_PATH_PROG(PKG_CONFIG, pkg-config, no) ++ fi ++ unset SYSTEMD_LIBS ++ unset SYSTEMD_INCS ++ if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libsystemd; then ++ SYSTEMD_LIBS=`$PKG_CONFIG --libs libsystemd` ++ SYSTEMD_INCS=`$PKG_CONFIG --cflags-only-I libsystemd` ++ HAVE_SD_DAEMON_H="yes" ++ else ++ 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 + if test $HAVE_SD_DAEMON_H = "no" || test -z "${SYSTEMD_LIBS}"; then + AC_MSG_ERROR([Your system does not support systemd.]) + else + AC_DEFINE(HAVE_SYSTEMD, 1, [FPM use systemd integration]) + PHP_FPM_SD_FILES="fpm/fpm_systemd.c" +- PHP_ADD_LIBRARY(systemd-daemon) ++ PHP_EVAL_LIBLINE($SYSTEMD_LIBS) ++ PHP_EVAL_INCLINE($SYSTEMD_INCS) + php_fpm_systemd=notify + fi + else +-- +2.1.4 + +From 144a08395408506fa700c71e74c360160da3bd99 Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@php.net> +Date: Sat, 19 Jul 2014 18:42:40 +0200 +Subject: [PATCH] improve previous, add message during configure + +--- + sapi/fpm/config.m4 | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4 +index e1c740d..96b0edf 100644 +--- a/sapi/fpm/config.m4 ++++ b/sapi/fpm/config.m4 +@@ -573,9 +573,12 @@ if test "$PHP_FPM" != "no"; then + unset SYSTEMD_LIBS + unset SYSTEMD_INCS + if test -x "$PKG_CONFIG" && $PKG_CONFIG --exists libsystemd; then ++ 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]) + else + 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"]) +-- +2.1.4 + |