com php-src: Use PKG_CHECK_MODULES to detect the sy stemd library: UPGRADING sapi/fpm/config.m4
| From: | Peter Kokot | Date: | Sat, 11 May 2019 22:19:03 +0000 |
| Subject: | com php-src: Use PKG_CHECK_MODULES to detect the sy stemd library: UPGRADING sapi/fpm/config.m4 | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106136@lists.php.net to get a copy of this message | ||
Commit: 755f6f6ede96d123ff660d4fe560a39b4f82a292
Author: Hugh McMaster <hugh.mcmaster@outlook.com> Fri, 10 May 2019 22:00:39 +1000
Committer: Peter Kokot <peterkokot@gmail.com> Sun, 12 May 2019 00:19:03 +0200
Parents: 4bf37e467b3db8f704f7a77cad72ddb8d0f6a912
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=755f6f6ede96d123ff660d4fe560a39b4f82a292
Log:
Use PKG_CHECK_MODULES to detect the systemd library
Changed paths:
M UPGRADING
M sapi/fpm/config.m4
Diff:
diff --git a/UPGRADING b/UPGRADING
index 27cd528..4ccbc38 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -476,7 +476,7 @@ paths can be specified either by adding additional directories to
PKG_CONFIG_PATH or by explicitly specifying compilation options through
FOO_CFLAGS and FOO_LIBS.
-The following extensions are affected:
+The following extensions and SAPIs are affected:
- Curl:
. --with-curl no longer accepts a directory.
@@ -503,6 +503,10 @@ The following extensions are affected:
- Readline:
. --with-libedit no longer accepts a directory.
+- FPM:
+ . --with-fpm-systemd now uses only pkg-config for libsystem checks. The
+ libsystemd minimum required version is 209.
+
- GD:
. --with-gd becomes --enable-gd (whether to enable the extension at all) and
--with-external-gd (to opt into using an external libgd, rather than the
diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4
index 3c0a7f3..5a1b4fa 100644
--- a/sapi/fpm/config.m4
+++ b/sapi/fpm/config.m4
@@ -591,38 +591,16 @@ if test "$PHP_FPM" != "no"; then
[no])
if test "$PHP_FPM_SYSTEMD" != "no" ; then
- 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
- 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")
- fi
+ PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209])
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
+ if test $HAVE_SD_DAEMON_H = "no"; 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_EVAL_LIBLINE($SYSTEMD_LIBS)
- PHP_EVAL_INCLINE($SYSTEMD_INCS)
+ PHP_EVAL_INCLINE($SYSTEMD_CFLAGS)
php_fpm_systemd=notify
fi
else