mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Autotools: Add phpized configure log and help separators (#15251)
- This quotes all PHP_CONFIGURE_PART arguments - When configuring and building extensions with phpize, this makes the './configure --help' and './configure' log output a bit more readable as it separates the extension configuration, Libtool configuration and the rest of the Autoconf and phpize configuration options. - The ./configure output separators bold tags are moved to the PHP_INIT_BUILD_SYSTEM macro to be available also in phpized extensions - The obsolete ticks `...` converted to the recommended $(...); Autoconf configure re-executes itself in shells where the $(...) still wouldn't work ok. For example, the default, initial, non-updated shell on Solaris 10. - Empty new lines in help separators synced (Autoconf default separators don't include additional empty newline after the separator title); so the PHP_HELP_SEPARATOR additional empty line is also removed (see './configure --help' output)
This commit is contained in:
parent
74eff98c84
commit
84e1920c12
3 changed files with 22 additions and 18 deletions
12
build/php.m4
12
build/php.m4
|
@ -9,11 +9,8 @@ dnl PHP_HELP_SEPARATOR(title)
|
|||
dnl
|
||||
dnl Adds separator title into the configure --help display.
|
||||
dnl
|
||||
AC_DEFUN([PHP_HELP_SEPARATOR],[
|
||||
AC_ARG_ENABLE([],[
|
||||
$1
|
||||
],[])
|
||||
])
|
||||
AC_DEFUN([PHP_HELP_SEPARATOR], [AC_ARG_ENABLE([], [
|
||||
$1], [])])
|
||||
|
||||
dnl
|
||||
dnl PHP_CONFIGURE_PART(title)
|
||||
|
@ -123,11 +120,14 @@ AC_DEFUN([PHP_CANONICAL_HOST_TARGET],[
|
|||
dnl
|
||||
dnl PHP_INIT_BUILD_SYSTEM
|
||||
dnl
|
||||
dnl Creates build directories and Makefile placeholders.
|
||||
dnl Initializes PHP build system configuration, creates build directories and
|
||||
dnl adds Makefile placeholders.
|
||||
dnl
|
||||
AC_DEFUN([PHP_INIT_BUILD_SYSTEM],
|
||||
[AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
|
||||
php_shtool=$srcdir/build/shtool
|
||||
T_MD=$($php_shtool echo -n -e %B)
|
||||
T_ME=$($php_shtool echo -n -e %b)
|
||||
> Makefile.objects
|
||||
> Makefile.fragments
|
||||
dnl Run at the end of the configuration, before creating the config.status.
|
||||
|
|
20
configure.ac
20
configure.ac
|
@ -100,9 +100,6 @@ dnl ----------------------------------------------------------------------------
|
|||
|
||||
PHP_INIT_BUILD_SYSTEM
|
||||
|
||||
T_MD=`$php_shtool echo -n -e %B`
|
||||
T_ME=`$php_shtool echo -n -e %b`
|
||||
|
||||
dnl We want this one before the checks, so the checks can modify CFLAGS.
|
||||
AS_VAR_IF([CFLAGS],, [auto_cflags=1])
|
||||
|
||||
|
@ -274,7 +271,7 @@ SAPI_SHARED=libs/$SAPI_LIBNAME_SHARED
|
|||
SAPI_STATIC=libs/$SAPI_LIBNAME_STATIC
|
||||
SAPI_LIBTOOL=libphp.la
|
||||
|
||||
PHP_CONFIGURE_PART(Configuring SAPI modules)
|
||||
PHP_CONFIGURE_PART([Configuring SAPI modules])
|
||||
|
||||
esyscmd(./build/config-stubs sapi)
|
||||
|
||||
|
@ -312,7 +309,7 @@ AS_VAR_IF([enable_zts], [yes], [
|
|||
dnl Starting system checks.
|
||||
dnl ----------------------------------------------------------------------------
|
||||
|
||||
PHP_CONFIGURE_PART(Running system checks)
|
||||
PHP_CONFIGURE_PART([Running system checks])
|
||||
|
||||
dnl Find sendmail binary.
|
||||
PHP_PROG_SENDMAIL
|
||||
|
@ -754,7 +751,7 @@ AS_VAR_IF([PHP_VALGRIND], [no],, [
|
|||
|
||||
dnl General settings.
|
||||
dnl ----------------------------------------------------------------------------
|
||||
PHP_CONFIGURE_PART(General settings)
|
||||
PHP_CONFIGURE_PART([General settings])
|
||||
|
||||
PHP_HELP_SEPARATOR([General settings:])
|
||||
|
||||
|
@ -1067,7 +1064,6 @@ dnl Extension configuration.
|
|||
dnl ----------------------------------------------------------------------------
|
||||
|
||||
PHP_HELP_SEPARATOR([[Extensions:
|
||||
|
||||
--with-EXTENSION=[shared[,PATH]]
|
||||
|
||||
NOTE: Not all extensions can be built as 'shared'.
|
||||
|
@ -1078,7 +1074,7 @@ PHP_HELP_SEPARATOR([[Extensions:
|
|||
o foobar package install prefix is /usr/local/foobar/
|
||||
]])
|
||||
|
||||
PHP_CONFIGURE_PART(Configuring extensions)
|
||||
PHP_CONFIGURE_PART([Configuring extensions])
|
||||
|
||||
dnl Check if all enabled by default extensions should be disabled.
|
||||
AC_ARG_ENABLE([all],
|
||||
|
@ -1152,7 +1148,7 @@ dnl PEAR
|
|||
dnl ----------------------------------------------------------------------------
|
||||
|
||||
PHP_HELP_SEPARATOR([PEAR:])
|
||||
PHP_CONFIGURE_PART(Configuring PEAR)
|
||||
PHP_CONFIGURE_PART([Configuring PEAR])
|
||||
|
||||
dnl If CLI is disabled disable PEAR.
|
||||
AS_VAR_IF([PHP_CLI], [no], [with_pear=no])
|
||||
|
@ -1192,7 +1188,7 @@ dnl Configuring Zend and TSRM.
|
|||
dnl ----------------------------------------------------------------------------
|
||||
|
||||
PHP_HELP_SEPARATOR([Zend:])
|
||||
PHP_CONFIGURE_PART(Configuring Zend)
|
||||
PHP_CONFIGURE_PART([Configuring Zend])
|
||||
|
||||
AC_ARG_ENABLE([fiber-asm],
|
||||
[AS_HELP_STRING([--disable-fiber-asm],
|
||||
|
@ -1578,7 +1574,7 @@ dnl Libtool creation.
|
|||
dnl
|
||||
|
||||
PHP_HELP_SEPARATOR([Libtool:])
|
||||
PHP_CONFIGURE_PART(Configuring libtool)
|
||||
PHP_CONFIGURE_PART([Configuring libtool])
|
||||
|
||||
dnl Silence warning: `ar: 'u' modifier ignored since 'D' is the default`
|
||||
dnl See https://github.com/php/php-src/pull/3017
|
||||
|
@ -1602,7 +1598,7 @@ PHP_SET_LIBTOOL_VARIABLE([--preserve-dup-deps])
|
|||
|
||||
CC=$old_CC
|
||||
|
||||
PHP_CONFIGURE_PART(Generating files)
|
||||
PHP_CONFIGURE_PART([Generating files])
|
||||
|
||||
CXXFLAGS_CLEAN=$CXXFLAGS
|
||||
CFLAGS_CLEAN="$CFLAGS \$(PROF_FLAGS)"
|
||||
|
|
|
@ -139,11 +139,17 @@ PHP_BUILD_SHARED
|
|||
dnl Required programs.
|
||||
PHP_PROG_AWK
|
||||
|
||||
PHP_HELP_SEPARATOR([Extension:])
|
||||
PHP_CONFIGURE_PART([Configuring extension])
|
||||
|
||||
sinclude(config.m4)
|
||||
|
||||
enable_static=no
|
||||
enable_shared=yes
|
||||
|
||||
PHP_HELP_SEPARATOR([Libtool:])
|
||||
PHP_CONFIGURE_PART([Configuring libtool])
|
||||
|
||||
dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called (by
|
||||
dnl PHP_REQUIRE_CXX). Otherwise AC_PROG_LIBTOOL fails if there is no working C++
|
||||
dnl compiler.
|
||||
|
@ -197,6 +203,8 @@ PHP_SUBST([SHELL])
|
|||
PHP_SUBST([INSTALL_HEADERS])
|
||||
PHP_SUBST([BUILD_CC])
|
||||
|
||||
PHP_CONFIGURE_PART([Generating files])
|
||||
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
AC_CONFIG_COMMANDS_PRE([PHP_PATCH_CONFIG_HEADERS([config.h.in])])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue