Skip to content

Commit 794ba29

Browse files
authored
Autotools: Fix PHP_EMBED_TYPE variable substitution (#15414)
This is a follow-up of f6dcca0 as Autoconf always seems to do a variable substitution, even when called conditionally. When passing argument other than shared or static to --enable-embed=ARGUMENT this now puts an empty string inside generated php-config script.
1 parent 4f4794b commit 794ba29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sapi/embed/config.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ if test "$PHP_EMBED" != "no"; then
1919
PHP_EMBED_TYPE=static
2020
INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(orig_libdir); \$(INSTALL) -m 0644 $SAPI_STATIC \$(INSTALL_ROOT)\$(orig_libdir)"
2121
],
22-
[PHP_EMBED_TYPE=no])
22+
[PHP_EMBED_TYPE=])
2323

24-
AS_VAR_IF([PHP_EMBED_TYPE], [no],, [
24+
AS_VAR_IF([PHP_EMBED_TYPE],, [AC_MSG_RESULT([no])], [
25+
AC_MSG_RESULT([$PHP_EMBED_TYPE])
2526
PHP_SUBST([LIBPHP_CFLAGS])
2627
AC_SUBST([PHP_EMBED_TYPE])
2728
PHP_SELECT_SAPI([embed],
@@ -30,7 +31,6 @@ if test "$PHP_EMBED" != "no"; then
3031
[-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1])
3132
PHP_INSTALL_HEADERS([sapi/embed], [php_embed.h])
3233
])
33-
AC_MSG_RESULT([$PHP_EMBED_TYPE])
3434
else
3535
AC_MSG_RESULT([no])
3636
fi

0 commit comments

Comments
 (0)