diff options
Diffstat (limited to 'sapi/fpm/config.m4')
-rw-r--r-- | sapi/fpm/config.m4 | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4 index 6191c329b..579f7c284 100644 --- a/sapi/fpm/config.m4 +++ b/sapi/fpm/config.m4 @@ -563,6 +563,26 @@ if test "$PHP_FPM" != "no"; then [ --with-fpm-group[=GRP] Set the group for php-fpm to run as. For a system user, this should usually be set to match the fpm username (default: nobody)], nobody, no) + PHP_ARG_WITH(fpm-systemd,, + [ --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 $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_fpm_systemd=notify + fi + else + php_fpm_systemd=simple + fi + PHP_SUBST_OLD(php_fpm_systemd) + AC_DEFINE_UNQUOTED(PHP_FPM_SYSTEMD, "$php_fpm_systemd", [fpm systemd service type]) + if test -z "$PHP_FPM_USER" -o "$PHP_FPM_USER" = "yes" -o "$PHP_FPM_USER" = "no"; then php_fpm_user="nobody" else @@ -635,7 +655,7 @@ if test "$PHP_FPM" != "no"; then fpm/events/port.c \ " - PHP_SELECT_SAPI(fpm, program, $PHP_FPM_FILES $PHP_FPM_TRACE_FILES, $PHP_FPM_CFLAGS, '$(SAPI_FPM_PATH)') + PHP_SELECT_SAPI(fpm, program, $PHP_FPM_FILES $PHP_FPM_TRACE_FILES $PHP_FPM_SD_FILES, $PHP_FPM_CFLAGS, '$(SAPI_FPM_PATH)') case $host_alias in *aix*) |