Autotools: Replace backticks command substitutions with $(...) (#15639)

This is a follow-up of previous backticks replacement commits. This
replaces backticks command substitutions in remaining ext config M4
files, phpize, and configure.ac with the recommended $(...).

Note that $(...) still does not work on some obsolete shells that ship
with Solaris 10, for example. Elsewhere they should work. However, for
these obsolete shells Autoconf also re-executes the shell script under
the supported shell so it can make them work regardless.

Additionally, few comments CS are also adjusted to not cause confusion
when searching for backticks usages and one indentation sync done.

As of Autoconf 2.72 the backticks in macro help texts are also replaced
with single quotes.
This commit is contained in:
Peter Kokot 2024-08-30 00:40:49 +02:00 committed by GitHub
parent 307565d577
commit 1b757c8d3c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 43 additions and 46 deletions

View file

@ -53,11 +53,11 @@ PHP_ARG_WITH([php-config],,
dnl For BC.
PHP_CONFIG=$PHP_PHP_CONFIG
prefix=`$PHP_CONFIG --prefix 2>/dev/null`
phpincludedir=`$PHP_CONFIG --include-dir 2>/dev/null`
INCLUDES=`$PHP_CONFIG --includes 2>/dev/null`
EXTENSION_DIR=`$PHP_CONFIG --extension-dir 2>/dev/null`
PHP_EXECUTABLE=`$PHP_CONFIG --php-binary 2>/dev/null`
prefix=$($PHP_CONFIG --prefix 2>/dev/null)
phpincludedir=$($PHP_CONFIG --include-dir 2>/dev/null)
INCLUDES=$($PHP_CONFIG --includes 2>/dev/null)
EXTENSION_DIR=$($PHP_CONFIG --extension-dir 2>/dev/null)
PHP_EXECUTABLE=$($PHP_CONFIG --php-binary 2>/dev/null)
AS_VAR_IF([prefix],,
[AC_MSG_ERROR([Cannot find php-config. Please use --with-php-config=PATH])])
@ -106,8 +106,8 @@ AS_VAR_IF([PHP_DEBUG], [yes], [
ZEND_DEBUG=yes
changequote({,})
dnl Discard known '-O...' flags, including just '-O', but do not remove only '-O' in '-Ounknown'
CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O\([0-9gsz]\|fast\|\)\([\t ]\|$\)//g'`
CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O\([0-9gsz]\|fast\|\)\([\t ]\|$\)//g'`
CFLAGS=$(echo "$CFLAGS" | $SED -e 's/-O\([0-9gsz]\|fast\|\)\([\t ]\|$\)//g')
CXXFLAGS=$(echo "$CXXFLAGS" | $SED -e 's/-O\([0-9gsz]\|fast\|\)\([\t ]\|$\)//g')
changequote([,])
dnl Add -O0 only if GCC or ICC is used.
if test "$GCC" = "yes" || test "$ICC" = "yes"; then