Skip to content

Commit c75fcd8

Browse files
committed
fix build without --prefix and make sure fpm_conf is recompiled every
time one changes --prefix
1 parent d1231c9 commit c75fcd8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

sapi/fpm/Makefile.frag

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ fpm: $(SAPI_FPM_PATH)
33
$(SAPI_FPM_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(SAPI_EXTRA_DEPS)
44
$(BUILD_FPM)
55

6+
$(builddir)/fpm/fpm_conf.lo: $(builddir)/../../main/build-defs.h
7+
68
install-build: install-fpm
79

810
install-fpm: install-sapi

sapi/fpm/config.m4

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,10 @@ AC_DEFUN([AC_FPM_VARS],
534534
php_fpm_conf_path="$PHP_FPM_CONF"
535535
fi
536536
537+
if test -z "$prefix" -o "$prefix" = "NONE"; then
538+
prefix="/usr/local"
539+
fi
540+
537541
if test -z "$php_fpm_conf_path"; then
538542
php_fpm_conf_path=`eval echo "$sysconfdir"`
539543
php_fpm_conf_path="$php_fpm_conf_path/php-fpm.conf"
@@ -636,7 +640,7 @@ if test "$PHP_FPM" != "no"; then
636640
AC_FPM_CHECKS
637641
AC_FPM_CONF
638642

639-
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/fpm/Makefile.frag)
643+
PHP_ADD_MAKEFILE_FRAGMENT([$abs_srcdir/sapi/fpm/Makefile.frag], [$abs_srcdir/sapi/fpm], [sapi/fpm])
640644

641645
SAPI_FPM_PATH=sapi/fpm/php-fpm
642646
PHP_SUBST(SAPI_FPM_PATH)

0 commit comments

Comments
 (0)