Skip to content

Autotools: Add PHP_EXTRA_CFLAGS environment variable #15707

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
2 changes: 2 additions & 0 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ PHP 8.4 INTERNALS UPGRADE NOTES
- ac_cv_write_stdout -> php_cv_have_write_stdout
and all other checks wrapped with their belonging cache variables (see *.m4
source files for details).
- New configure-phase environment variable PHP_EXTRA_CFLAGS to append
additional build-time CFLAGS to the PHP build.

c. Windows build system changes
- The configure options --with-oci8-11g, --with-oci8-12c, --with-oci8-19,
Expand Down
6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1431,6 +1431,12 @@ AS_VAR_IF([PHP_BUILD_ARCH],,,
[AC_DEFINE_UNQUOTED([PHP_BUILD_ARCH], ["$PHP_BUILD_ARCH"],
[The build architecture.])])

AC_ARG_VAR([PHP_EXTRA_CFLAGS],
[Additional build-phase compilation options appended to CFLAGS when building
PHP; these are isolated from the Autoconf configure checks and its CFLAGS])
AS_VAR_IF([PHP_EXTRA_CFLAGS],,, [EXTRA_CFLAGS=$PHP_EXTRA_CFLAGS])

PHP_SUBST([EXTRA_CFLAGS])
PHP_SUBST([PHP_FASTCGI_OBJS])
PHP_SUBST([PHP_SAPI_OBJS])
PHP_SUBST([PHP_BINARY_OBJS])
Expand Down
Loading