Skip to content

Autotools: Add phpized configure log and help separators #15251

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 4 commits into from
Aug 6, 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
12 changes: 6 additions & 6 deletions build/php.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down
20 changes: 8 additions & 12 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:])

Expand Down Expand Up @@ -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'.
Expand All @@ -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],
Expand Down Expand Up @@ -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])
Expand Down Expand Up @@ -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],
Expand Down Expand Up @@ -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
Expand All @@ -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)"
Expand Down
8 changes: 8 additions & 0 deletions scripts/phpize.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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])])
Expand Down