mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fix AS_VAR_* checks (#14868)
AS_VAR_SET_IF doesn't behave the same as "test -n" and/or "test -z", which becomes an issue for Apache's ZTS automatic enabling and CFLAGS edge case where it would be explicitly set to empty value. It is safer to use AS_VAR_IF instead of AS_VAR_SET_IF in these cases.
This commit is contained in:
@@ -111,7 +111,7 @@ T_ME=`$php_shtool echo -n -e %b`
|
||||
PHP_INIT_BUILD_SYSTEM
|
||||
|
||||
dnl We want this one before the checks, so the checks can modify CFLAGS.
|
||||
AS_VAR_SET_IF([CFLAGS],, [auto_cflags=1])
|
||||
AS_VAR_IF([CFLAGS],, [auto_cflags=1])
|
||||
|
||||
abs_srcdir=`(cd $srcdir; pwd)`
|
||||
abs_builddir=`pwd`
|
||||
|
||||
@@ -106,5 +106,5 @@ if test "$PHP_APXS2" != "no"; then
|
||||
esac
|
||||
|
||||
APACHE_THREADED_MPM=$($APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes')
|
||||
AS_VAR_SET_IF([APACHE_THREADED_MPM], [PHP_BUILD_THREAD_SAFE])
|
||||
AS_VAR_IF([APACHE_THREADED_MPM],,, [PHP_BUILD_THREAD_SAFE])
|
||||
fi
|
||||
|
||||
@@ -26,7 +26,7 @@ AC_DEFUN([PHP_ALWAYS_SHARED],[
|
||||
test "[$]$1" = "no" && $1=yes
|
||||
])dnl
|
||||
|
||||
AS_VAR_SET_IF([CFLAGS],, [auto_cflags=1])
|
||||
AS_VAR_IF([CFLAGS],, [auto_cflags=1])
|
||||
|
||||
abs_srcdir=`(cd $srcdir && pwd)`
|
||||
abs_builddir=`pwd`
|
||||
@@ -62,7 +62,7 @@ INCLUDES=`$PHP_CONFIG --includes 2>/dev/null`
|
||||
EXTENSION_DIR=`$PHP_CONFIG --extension-dir 2>/dev/null`
|
||||
PHP_EXECUTABLE=`$PHP_CONFIG --php-binary 2>/dev/null`
|
||||
|
||||
AS_VAR_SET_IF([prefix],,
|
||||
AS_VAR_IF([prefix],,
|
||||
[AC_MSG_ERROR([Cannot find php-config. Please use --with-php-config=PATH])])
|
||||
|
||||
php_shtool=$srcdir/build/shtool
|
||||
|
||||
Reference in New Issue
Block a user