mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Autotools: Document PHP environment build configuration vars (#15684)
This marks the following environment variables as precious:
- PHP_BUILD_ARCH
- PHP_BUILD_COMPILER
- PHP_BUILD_PROVIDER
- PHP_BUILD_SYSTEM
- PHP_UNAME
Meaning, they are now also shown in the `./configure --help` output, and
they can be used like this when configuring the PHP build:
./configure PHP_BUILD_ARCH="..." PHP_BUILD_COMPILER="..." ...
This commit is contained in:
39
configure.ac
39
configure.ac
@@ -1401,26 +1401,35 @@ PHP_REMOVE_USR_LIB([LDFLAGS])
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
|
||||
EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS"
|
||||
|
||||
UNAME=$(uname -a | xargs)
|
||||
PHP_UNAME=${PHP_UNAME:-$UNAME}
|
||||
AC_ARG_VAR([PHP_UNAME],
|
||||
[System information (defaults to the 'uname -a' output)])
|
||||
AS_VAR_IF([PHP_UNAME],, [PHP_UNAME=$(uname -a | xargs)])
|
||||
AC_DEFINE_UNQUOTED([PHP_UNAME], ["$PHP_UNAME"], [The 'uname -a' output.])
|
||||
|
||||
PHP_OS=$(uname | xargs)
|
||||
AC_DEFINE_UNQUOTED([PHP_OS], ["$PHP_OS"], [The 'uname' output.])
|
||||
PHP_BUILD_SYSTEM=${PHP_BUILD_SYSTEM:-$PHP_UNAME}
|
||||
|
||||
AC_ARG_VAR([PHP_BUILD_SYSTEM],
|
||||
[The system that PHP was built on (defaults to the 'uname -a' output)])
|
||||
AS_VAR_IF([PHP_BUILD_SYSTEM],, [PHP_BUILD_SYSTEM=$PHP_UNAME])
|
||||
AC_DEFINE_UNQUOTED([PHP_BUILD_SYSTEM], ["$PHP_BUILD_SYSTEM"],
|
||||
[The system that PHP was built on.])
|
||||
if test -n "${PHP_BUILD_PROVIDER}"; then
|
||||
AC_DEFINE_UNQUOTED([PHP_BUILD_PROVIDER], ["$PHP_BUILD_PROVIDER"],
|
||||
[The PHP build provider information.])
|
||||
fi
|
||||
if test -n "${PHP_BUILD_COMPILER}"; then
|
||||
AC_DEFINE_UNQUOTED([PHP_BUILD_COMPILER], ["$PHP_BUILD_COMPILER"],
|
||||
[The compiler used for the PHP build.])
|
||||
fi
|
||||
if test -n "${PHP_BUILD_ARCH}"; then
|
||||
AC_DEFINE_UNQUOTED([PHP_BUILD_ARCH], ["$PHP_BUILD_ARCH"],
|
||||
[The build architecture.])
|
||||
fi
|
||||
|
||||
AC_ARG_VAR([PHP_BUILD_PROVIDER], [The PHP build provider information])
|
||||
AS_VAR_IF([PHP_BUILD_PROVIDER],,,
|
||||
[AC_DEFINE_UNQUOTED([PHP_BUILD_PROVIDER], ["$PHP_BUILD_PROVIDER"],
|
||||
[The PHP build provider information.])])
|
||||
|
||||
AC_ARG_VAR([PHP_BUILD_COMPILER],
|
||||
[Information about the compiler used for the PHP build])
|
||||
AS_VAR_IF([PHP_BUILD_COMPILER],,,
|
||||
[AC_DEFINE_UNQUOTED([PHP_BUILD_COMPILER], ["$PHP_BUILD_COMPILER"],
|
||||
[The compiler used for the PHP build.])])
|
||||
|
||||
AC_ARG_VAR([PHP_BUILD_ARCH], [The build architecture])
|
||||
AS_VAR_IF([PHP_BUILD_ARCH],,,
|
||||
[AC_DEFINE_UNQUOTED([PHP_BUILD_ARCH], ["$PHP_BUILD_ARCH"],
|
||||
[The build architecture.])])
|
||||
|
||||
PHP_SUBST([PHP_FASTCGI_OBJS])
|
||||
PHP_SUBST([PHP_SAPI_OBJS])
|
||||
|
||||
Reference in New Issue
Block a user