Skip to content

Autotools: Sync PHP_SUBST in sapi #14753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions sapi/apache2handler/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ if test "$PHP_APXS2" != "no"; then
fi

LIBPHP_CFLAGS="-shared"
PHP_SUBST(LIBPHP_CFLAGS)
PHP_SUBST([LIBPHP_CFLAGS])

case $host_alias in
*aix*)
Expand All @@ -96,7 +96,7 @@ if test "$PHP_APXS2" != "no"; then
MH_BUNDLE_FLAGS="`$APU_CONFIG --ldflags --link-ld --libs` $MH_BUNDLE_FLAGS"
fi
MH_BUNDLE_FLAGS="-bundle -bundle_loader $APXS_HTTPD $MH_BUNDLE_FLAGS"
PHP_SUBST(MH_BUNDLE_FLAGS)
PHP_SUBST([MH_BUNDLE_FLAGS])
PHP_SELECT_SAPI(apache2handler, bundle, mod_php.c sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
SAPI_SHARED=libs/libphp.so
INSTALL_IT="$INSTALL_IT $SAPI_SHARED"
Expand All @@ -119,7 +119,6 @@ if test "$PHP_APXS2" != "no"; then
fi
fi
AC_MSG_RESULT(yes)
PHP_SUBST(APXS)
else
AC_MSG_RESULT(no)
fi
5 changes: 2 additions & 3 deletions sapi/cgi/config9.m4
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ if test "$PHP_CGI" != "no"; then
;;
esac

dnl Expose to Makefile.
PHP_SUBST(SAPI_CGI_PATH)
PHP_SUBST(BUILD_CGI)
PHP_SUBST([SAPI_CGI_PATH])
PHP_SUBST([BUILD_CGI])

PHP_OUTPUT(sapi/cgi/php-cgi.1)
else
Expand Down
7 changes: 3 additions & 4 deletions sapi/cli/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,10 @@ if test "$PHP_CLI" != "no"; then

dnl Set executable for tests.
PHP_EXECUTABLE="\$(top_builddir)/\$(SAPI_CLI_PATH)"
PHP_SUBST(PHP_EXECUTABLE)

dnl Expose to Makefile.
PHP_SUBST(SAPI_CLI_PATH)
PHP_SUBST(BUILD_CLI)
PHP_SUBST([PHP_EXECUTABLE])
PHP_SUBST([SAPI_CLI_PATH])
PHP_SUBST([BUILD_CLI])

PHP_OUTPUT(sapi/cli/php.1)

Expand Down
2 changes: 1 addition & 1 deletion sapi/embed/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if test "$PHP_EMBED" != "no"; then
;;
esac
if test "$PHP_EMBED_TYPE" != "no"; then
PHP_SUBST(LIBPHP_CFLAGS)
PHP_SUBST([LIBPHP_CFLAGS])
PHP_SELECT_SAPI(embed, $PHP_EMBED_TYPE, php_embed.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
PHP_INSTALL_HEADERS([sapi/embed], [php_embed.h])
fi
Expand Down
4 changes: 2 additions & 2 deletions sapi/fpm/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,8 @@ if test "$PHP_FPM" != "no"; then
;;
esac

PHP_SUBST(SAPI_FPM_PATH)
PHP_SUBST(BUILD_FPM)
PHP_SUBST([SAPI_FPM_PATH])
PHP_SUBST([BUILD_FPM])

else
AC_MSG_RESULT(no)
Expand Down
10 changes: 5 additions & 5 deletions sapi/fuzzer/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dnl PHP_FUZZER_TARGET(name, target-var)
dnl
AC_DEFUN([PHP_FUZZER_TARGET], [
PHP_FUZZER_BINARIES="$PHP_FUZZER_BINARIES $SAPI_FUZZER_PATH/php-fuzz-$1"
PHP_SUBST($2)
PHP_SUBST([$2])
PHP_ADD_SOURCES_X([sapi/fuzzer],[fuzzer-$1.c],[],$2)
$2="[$]$2 $FUZZER_COMMON_OBJS"
])
Expand All @@ -29,7 +29,7 @@ if test "$PHP_FUZZER" != "no"; then
AC_PROG_CXXCPP
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/fuzzer/Makefile.frag)
SAPI_FUZZER_PATH=sapi/fuzzer
PHP_SUBST(SAPI_FUZZER_PATH)
PHP_SUBST([SAPI_FUZZER_PATH])
if test -z "$LIB_FUZZING_ENGINE"; then
FUZZING_LIB="-fsanitize=fuzzer"
FUZZING_CC="$CC"
Expand All @@ -43,8 +43,8 @@ if test "$PHP_FUZZER" != "no"; then
FUZZING_LIB="$LIB_FUZZING_ENGINE"
FUZZING_CC="$CXX -stdlib=libc++"
fi
PHP_SUBST(FUZZING_LIB)
PHP_SUBST(FUZZING_CC)
PHP_SUBST([FUZZING_LIB])
PHP_SUBST([FUZZING_CC])

dnl PHP_SELECT_SAPI(fuzzer-parser, program, $FUZZER_SOURCES, , '$(SAPI_FUZZER_PATH)')

Expand Down Expand Up @@ -73,5 +73,5 @@ if test "$PHP_FUZZER" != "no"; then
fi
fi

PHP_SUBST(PHP_FUZZER_BINARIES)
PHP_SUBST([PHP_FUZZER_BINARIES])
fi
4 changes: 2 additions & 2 deletions sapi/litespeed/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ if test "$PHP_LITESPEED" != "no"; then
;;
esac

PHP_SUBST(SAPI_LITESPEED_PATH)
PHP_SUBST(BUILD_LITESPEED)
PHP_SUBST([SAPI_LITESPEED_PATH])
PHP_SUBST([BUILD_LITESPEED])
fi

AC_MSG_RESULT($PHP_LITESPEED)
11 changes: 5 additions & 6 deletions sapi/phpdbg/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ if test "$PHP_PHPDBG" != "no"; then
fi
],,[#include <linux/userfaultfd.h>])

PHP_SUBST(PHPDBG_EXTRA_LIBS)

PHP_ADD_MAKEFILE_FRAGMENT([$abs_srcdir/sapi/phpdbg/Makefile.frag], [$abs_srcdir/sapi/phpdbg], [$abs_builddir/sapi/phpdbg])
PHP_SELECT_SAPI(phpdbg, program, $PHP_PHPDBG_FILES, $PHP_PHPDBG_CFLAGS, [$(SAPI_PHPDBG_PATH)])

Expand Down Expand Up @@ -97,10 +95,11 @@ if test "$PHP_PHPDBG" != "no"; then
\-DPHPDBG_SHARED \
-o \$(BUILD_SHARED)"

PHP_SUBST(BUILD_BINARY)
PHP_SUBST(BUILD_SHARED)
PHP_SUBST(BUILD_PHPDBG)
PHP_SUBST(BUILD_PHPDBG_SHARED)
PHP_SUBST([PHPDBG_EXTRA_LIBS])
PHP_SUBST([BUILD_BINARY])
PHP_SUBST([BUILD_SHARED])
PHP_SUBST([BUILD_PHPDBG])
PHP_SUBST([BUILD_PHPDBG_SHARED])

PHP_OUTPUT(sapi/phpdbg/phpdbg.1)
fi
Loading