From 1ceadaed5235c386a31e2c7015078c515dd522ae Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Mon, 29 Jul 2024 00:14:59 +0200 Subject: [PATCH] Autotools: Normalize and quote all PHP_NEW_EXTENSION arguments (#15144) This adds Autoconf quote characters to all PHP_NEW_EXTENSION arguments and syncs the CS across the php-src Autotools build system. --- docs-old/self-contained-extensions.md | 4 +- docs-old/unix-build-system.md | 4 +- ext/bcmath/config.m4 | 52 +++++------ ext/bz2/config.m4 | 2 +- ext/calendar/config.m4 | 4 +- ext/ctype/config.m4 | 2 +- ext/date/config0.m4 | 5 +- ext/dba/config.m4 | 22 ++++- ext/dl_test/config.m4 | 5 +- ext/enchant/config.m4 | 2 +- ext/exif/config.m4 | 5 +- ext/ffi/config.m4 | 5 +- ext/filter/config.m4 | 5 +- ext/ftp/config.m4 | 2 +- ext/gettext/config.m4 | 2 +- ext/gmp/config.m4 | 5 +- ext/iconv/config.m4 | 5 +- ext/intl/config.m4 | 103 ++++++++++---------- ext/json/config.m4 | 14 +-- ext/ldap/config.m4 | 5 +- ext/mbstring/config.m4 | 5 +- ext/mysqli/config.m4 | 5 +- ext/odbc/config.m4 | 5 +- ext/openssl/config0.m4 | 2 +- ext/pcntl/config.m4 | 6 +- ext/pdo/config.m4 | 4 +- ext/pdo_dblib/config.m4 | 5 +- ext/pdo_firebird/config.m4 | 4 +- ext/pdo_mysql/config.m4 | 5 +- ext/pdo_odbc/config.m4 | 4 +- ext/pdo_pgsql/config.m4 | 4 +- ext/pdo_sqlite/config.m4 | 5 +- ext/pgsql/config.m4 | 5 +- ext/phar/config.m4 | 14 ++- ext/posix/config.m4 | 5 +- ext/random/config.m4 | 28 +++--- ext/reflection/config.m4 | 5 +- ext/session/config.m4 | 5 +- ext/shmop/config.m4 | 2 +- ext/snmp/config.m4 | 2 +- ext/sockets/config.m4 | 5 +- ext/sodium/config.m4 | 5 +- ext/spl/config.m4 | 15 ++- ext/sqlite3/config0.m4 | 5 +- ext/standard/config.m4 | 130 +++++++++++++------------- ext/sysvmsg/config.m4 | 2 +- ext/sysvsem/config.m4 | 2 +- ext/sysvshm/config.m4 | 2 +- ext/tidy/config.m4 | 2 +- ext/tokenizer/config.m4 | 2 +- ext/xsl/config.m4 | 2 +- ext/zend_test/config.m4 | 11 ++- ext/zip/config.m4 | 3 +- 53 files changed, 346 insertions(+), 213 deletions(-) diff --git a/docs-old/self-contained-extensions.md b/docs-old/self-contained-extensions.md index ec2b0755912..524b2e19f65 100644 --- a/docs-old/self-contained-extensions.md +++ b/docs-old/self-contained-extensions.md @@ -84,7 +84,7 @@ PHP_ARG_ENABLE([foobar], [Enable foobar])]) if test "$PHP_FOOBAR" != "no"; then - PHP_NEW_EXTENSION(foobar, foo.c bar.c, $ext_shared) + PHP_NEW_EXTENSION([foobar], [foo.c bar.c], [$ext_shared]) fi ``` @@ -145,7 +145,7 @@ an existing module called `foo`. automatically be able to use `--with-foo=shared[,..]` or `--enable-foo=shared[,..]`. -2. In `config.m4`, use `PHP_NEW_EXTENSION(foo,.., $ext_shared)` to enable +2. In `config.m4`, use `PHP_NEW_EXTENSION([foo],.., [$ext_shared])` to enable building the extension. 3. Add the following lines to your C source file: diff --git a/docs-old/unix-build-system.md b/docs-old/unix-build-system.md index 563d41ce591..01bb8e4e51c 100644 --- a/docs-old/unix-build-system.md +++ b/docs-old/unix-build-system.md @@ -38,7 +38,7 @@ Makefile.ins are abandoned. The files which are to be compiled are specified in the `config.m4` now using the following macro: ```m4 -PHP_NEW_EXTENSION(foo, foo.c bar.c baz.cpp, $ext_shared) +PHP_NEW_EXTENSION([foo], [foo.c bar.c baz.cpp], [$ext_shared]) ``` E.g. this enables the extension foo which consists of three source-code modules, @@ -61,7 +61,7 @@ here as well. If you need to specify separate include directories, do it this way: ```m4 -PHP_NEW_EXTENSION(foo, foo.c mylib/bar.c mylib/gregor.c,,,-I@ext_srcdir@/lib) +PHP_NEW_EXTENSION([foo], [foo.c mylib/bar.c mylib/gregor.c],,, [-I@ext_srcdir@/lib]) ``` E.g. this builds the three files which are located relative to the extension diff --git a/ext/bcmath/config.m4 b/ext/bcmath/config.m4 index 4bb34d55534..4dbeb6c3adc 100644 --- a/ext/bcmath/config.m4 +++ b/ext/bcmath/config.m4 @@ -5,32 +5,32 @@ PHP_ARG_ENABLE([bcmath], if test "$PHP_BCMATH" != "no"; then PHP_NEW_EXTENSION([bcmath], m4_normalize([ - bcmath.c - libbcmath/src/add.c - libbcmath/src/compare.c - libbcmath/src/convert.c - libbcmath/src/div.c - libbcmath/src/divmod.c - libbcmath/src/doaddsub.c - libbcmath/src/floor_or_ceil.c - libbcmath/src/init.c - libbcmath/src/int2num.c - libbcmath/src/nearzero.c - libbcmath/src/neg.c - libbcmath/src/num2long.c - libbcmath/src/num2str.c - libbcmath/src/raise.c - libbcmath/src/raisemod.c - libbcmath/src/recmul.c - libbcmath/src/rmzero.c - libbcmath/src/round.c - libbcmath/src/sqrt.c - libbcmath/src/str2num.c - libbcmath/src/sub.c - libbcmath/src/zero.c - ]), - [$ext_shared],, - [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) + bcmath.c + libbcmath/src/add.c + libbcmath/src/compare.c + libbcmath/src/convert.c + libbcmath/src/div.c + libbcmath/src/divmod.c + libbcmath/src/doaddsub.c + libbcmath/src/floor_or_ceil.c + libbcmath/src/init.c + libbcmath/src/int2num.c + libbcmath/src/nearzero.c + libbcmath/src/neg.c + libbcmath/src/num2long.c + libbcmath/src/num2str.c + libbcmath/src/raise.c + libbcmath/src/raisemod.c + libbcmath/src/recmul.c + libbcmath/src/rmzero.c + libbcmath/src/round.c + libbcmath/src/sqrt.c + libbcmath/src/str2num.c + libbcmath/src/sub.c + libbcmath/src/zero.c + ]), + [$ext_shared],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) PHP_ADD_BUILD_DIR([$ext_builddir/libbcmath/src]) AC_DEFINE(HAVE_BCMATH, 1, [Whether you have bcmath]) fi diff --git a/ext/bz2/config.m4 b/ext/bz2/config.m4 index 94be82509a6..8cb198b8200 100644 --- a/ext/bz2/config.m4 +++ b/ext/bz2/config.m4 @@ -32,6 +32,6 @@ if test "$PHP_BZ2" != "no"; then [AC_MSG_ERROR([bz2 module requires libbz2 >= 1.0.0])], [-L$BZIP_DIR/$PHP_LIBDIR]) - PHP_NEW_EXTENSION(bz2, bz2.c bz2_filter.c, $ext_shared) + PHP_NEW_EXTENSION([bz2], [bz2.c bz2_filter.c], [$ext_shared]) PHP_SUBST([BZ2_SHARED_LIBADD]) fi diff --git a/ext/calendar/config.m4 b/ext/calendar/config.m4 index bb3cfe4a622..c2ffbf475e3 100644 --- a/ext/calendar/config.m4 +++ b/ext/calendar/config.m4 @@ -5,5 +5,7 @@ PHP_ARG_ENABLE([calendar], if test "$PHP_CALENDAR" = "yes"; then AC_DEFINE(HAVE_CALENDAR,1,[ ]) - PHP_NEW_EXTENSION(calendar, calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c, $ext_shared) + PHP_NEW_EXTENSION([calendar], + [calendar.c dow.c french.c gregor.c jewish.c julian.c easter.c cal_unix.c], + [$ext_shared]) fi diff --git a/ext/ctype/config.m4 b/ext/ctype/config.m4 index 7646525a709..549cee6a867 100644 --- a/ext/ctype/config.m4 +++ b/ext/ctype/config.m4 @@ -6,5 +6,5 @@ PHP_ARG_ENABLE([ctype], if test "$PHP_CTYPE" != "no"; then AC_DEFINE(HAVE_CTYPE, 1, [ ]) - PHP_NEW_EXTENSION(ctype, ctype.c, $ext_shared) + PHP_NEW_EXTENSION([ctype], [ctype.c], [$ext_shared]) fi diff --git a/ext/date/config0.m4 b/ext/date/config0.m4 index 551291e2505..1f091215be3 100644 --- a/ext/date/config0.m4 +++ b/ext/date/config0.m4 @@ -12,7 +12,10 @@ PHP_DATE_CFLAGS="$PHP_DATE_CFLAGS -I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRM timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c lib/parse_posix.c lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c lib/parse_iso_intervals.c lib/interval.c" -PHP_NEW_EXTENSION(date, php_date.c $timelib_sources, no,, $PHP_DATE_CFLAGS) +PHP_NEW_EXTENSION([date], + [php_date.c $timelib_sources], + [no],, + [$PHP_DATE_CFLAGS]) PHP_ADD_BUILD_DIR([$ext_builddir/lib], [1]) PHP_ADD_INCLUDE([$ext_builddir/lib]) diff --git a/ext/dba/config.m4 b/ext/dba/config.m4 index 2facac72741..4d161fce32e 100644 --- a/ext/dba/config.m4 +++ b/ext/dba/config.m4 @@ -701,7 +701,27 @@ if test "$HAVE_DBA" = "1"; then AC_MSG_RESULT([yes]) fi AC_DEFINE(HAVE_DBA, 1, [ ]) - PHP_NEW_EXTENSION(dba, dba.c dba_cdb.c dba_dbm.c dba_gdbm.c dba_ndbm.c dba_db1.c dba_db2.c dba_db3.c dba_db4.c dba_flatfile.c dba_inifile.c dba_qdbm.c dba_tcadb.c dba_lmdb.c $cdb_sources $flat_sources $ini_sources, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + PHP_NEW_EXTENSION([dba], m4_normalize([ + dba_cdb.c + dba_db1.c + dba_db2.c + dba_db3.c + dba_db4.c + dba_dbm.c + dba_flatfile.c + dba_gdbm.c + dba_inifile.c + dba_lmdb.c + dba_ndbm.c + dba_qdbm.c + dba_tcadb.c + dba.c + $cdb_sources + $flat_sources + $ini_sources + ]), + [$ext_shared],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) PHP_ADD_BUILD_DIR([$ext_builddir/libcdb]) PHP_ADD_BUILD_DIR([$ext_builddir/libflatfile]) PHP_ADD_BUILD_DIR([$ext_builddir/libinifile]) diff --git a/ext/dl_test/config.m4 b/ext/dl_test/config.m4 index 10f1adae71b..ae53e5bd9c3 100644 --- a/ext/dl_test/config.m4 +++ b/ext/dl_test/config.m4 @@ -4,5 +4,8 @@ PHP_ARG_ENABLE([dl-test], [Enable dl_test extension])]) if test "$PHP_DL_TEST" != "no"; then - PHP_NEW_EXTENSION(dl_test, dl_test.c, [shared],, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + PHP_NEW_EXTENSION([dl_test], + [dl_test.c], + [shared],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) fi diff --git a/ext/enchant/config.m4 b/ext/enchant/config.m4 index 087f7ec3b7a..b2b2c25a8fb 100644 --- a/ext/enchant/config.m4 +++ b/ext/enchant/config.m4 @@ -35,6 +35,6 @@ if test "$PHP_ENCHANT" != "no"; then AC_DEFINE(HAVE_ENCHANT, 1, [ ]) - PHP_NEW_EXTENSION(enchant, enchant.c, $ext_shared) + PHP_NEW_EXTENSION([enchant], [enchant.c], [$ext_shared]) PHP_SUBST([ENCHANT_SHARED_LIBADD]) fi diff --git a/ext/exif/config.m4 b/ext/exif/config.m4 index a2e3250a9da..f6f38128816 100644 --- a/ext/exif/config.m4 +++ b/ext/exif/config.m4 @@ -5,5 +5,8 @@ PHP_ARG_ENABLE([exif], if test "$PHP_EXIF" != "no"; then AC_DEFINE(HAVE_EXIF, 1, [Whether you want EXIF (metadata from images) support]) - PHP_NEW_EXTENSION(exif, exif.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + PHP_NEW_EXTENSION([exif], + [exif.c], + [$ext_shared],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) fi diff --git a/ext/ffi/config.m4 b/ext/ffi/config.m4 index a516f466bf8..b2a889e5de7 100644 --- a/ext/ffi/config.m4 +++ b/ext/ffi/config.m4 @@ -27,6 +27,9 @@ if test "$PHP_FFI" != "no"; then PHP_FFI_CHECK_DECL([FFI_MS_CDECL]) PHP_FFI_CHECK_DECL([FFI_SYSV]) - PHP_NEW_EXTENSION(ffi, ffi.c ffi_parser.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + PHP_NEW_EXTENSION([ffi], + [ffi.c ffi_parser.c], + [$ext_shared],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) PHP_SUBST([FFI_SHARED_LIBADD]) fi diff --git a/ext/filter/config.m4 b/ext/filter/config.m4 index 7a5a4b682e9..696a093d30a 100644 --- a/ext/filter/config.m4 +++ b/ext/filter/config.m4 @@ -5,7 +5,10 @@ PHP_ARG_ENABLE([filter], [yes]) if test "$PHP_FILTER" != "no"; then - PHP_NEW_EXTENSION(filter, filter.c sanitizing_filters.c logical_filters.c callback_filter.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + PHP_NEW_EXTENSION([filter], + [filter.c sanitizing_filters.c logical_filters.c callback_filter.c], + [$ext_shared],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) PHP_INSTALL_HEADERS([ext/filter], [php_filter.h]) PHP_ADD_EXTENSION_DEP(filter, pcre) diff --git a/ext/ftp/config.m4 b/ext/ftp/config.m4 index 383888b415b..0837b846504 100644 --- a/ext/ftp/config.m4 +++ b/ext/ftp/config.m4 @@ -14,7 +14,7 @@ PHP_ARG_WITH([ftp-ssl], if test "$PHP_FTP" = "yes"; then AC_DEFINE(HAVE_FTP,1,[Whether you want FTP support]) - PHP_NEW_EXTENSION(ftp, php_ftp.c ftp.c, $ext_shared) + PHP_NEW_EXTENSION([ftp], [php_ftp.c ftp.c], [$ext_shared]) dnl Empty variable means 'no' (for phpize builds). test -z "$PHP_OPENSSL" && PHP_OPENSSL=no diff --git a/ext/gettext/config.m4 b/ext/gettext/config.m4 index d51b2dc9139..e07e3910cea 100644 --- a/ext/gettext/config.m4 +++ b/ext/gettext/config.m4 @@ -28,7 +28,7 @@ if test "$PHP_GETTEXT" != "no"; then [AC_MSG_ERROR([Unable to find required gettext library])])]) AC_DEFINE([HAVE_LIBINTL], [1], [Define to 1 if you have the 'intl' library.]) - PHP_NEW_EXTENSION(gettext, gettext.c, $ext_shared) + PHP_NEW_EXTENSION([gettext], [gettext.c], [$ext_shared]) PHP_SUBST([GETTEXT_SHARED_LIBADD]) PHP_ADD_INCLUDE([$GETTEXT_INCDIR]) diff --git a/ext/gmp/config.m4 b/ext/gmp/config.m4 index 20eba932aa1..db53d3df18c 100644 --- a/ext/gmp/config.m4 +++ b/ext/gmp/config.m4 @@ -28,7 +28,10 @@ if test "$PHP_GMP" != "no"; then PHP_INSTALL_HEADERS([ext/gmp], [php_gmp_int.h]) - PHP_NEW_EXTENSION(gmp, gmp.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + PHP_NEW_EXTENSION([gmp], + [gmp.c], + [$ext_shared],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) PHP_SUBST([GMP_SHARED_LIBADD]) AC_DEFINE(HAVE_GMP, 1, [ ]) fi diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 index 57cd2eaab72..c6c9acf1f02 100644 --- a/ext/iconv/config.m4 +++ b/ext/iconv/config.m4 @@ -127,7 +127,10 @@ int main(void) { LDFLAGS="$save_LDFLAGS" CFLAGS="$save_CFLAGS" - PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared,, [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) + PHP_NEW_EXTENSION([iconv], + [iconv.c], + [$ext_shared],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) PHP_SUBST([ICONV_SHARED_LIBADD]) PHP_INSTALL_HEADERS([ext/iconv], [php_iconv.h]) fi diff --git a/ext/intl/config.m4 b/ext/intl/config.m4 index b30db8adf35..5773a2879e6 100644 --- a/ext/intl/config.m4 +++ b/ext/intl/config.m4 @@ -7,55 +7,60 @@ if test "$PHP_INTL" != "no"; then PHP_SETUP_ICU([INTL_SHARED_LIBADD]) PHP_SUBST([INTL_SHARED_LIBADD]) INTL_COMMON_FLAGS="$ICU_CFLAGS -Wno-write-strings -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1" - PHP_NEW_EXTENSION(intl, php_intl.c \ - intl_error.c \ - intl_convert.c \ - collator/collator_class.c \ - collator/collator_sort.c \ - collator/collator_convert.c \ - collator/collator_locale.c \ - collator/collator_compare.c \ - collator/collator_attr.c \ - collator/collator_create.c \ - collator/collator_is_numeric.c \ - collator/collator_error.c \ - common/common_error.c \ - converter/converter.c \ - formatter/formatter_main.c \ - formatter/formatter_class.c \ - formatter/formatter_attr.c \ - formatter/formatter_data.c \ - formatter/formatter_format.c \ - formatter/formatter_parse.c \ - normalizer/normalizer_class.c \ - normalizer/normalizer_normalize.c \ - locale/locale.c \ - locale/locale_class.c \ - locale/locale_methods.c \ - dateformat/dateformat.c \ - dateformat/dateformat_class.c \ - dateformat/dateformat_attr.c \ - dateformat/dateformat_data.c \ - dateformat/dateformat_format.c \ - dateformat/dateformat_parse.c \ - msgformat/msgformat.c \ - msgformat/msgformat_attr.c \ - msgformat/msgformat_class.c \ - msgformat/msgformat_data.c \ - msgformat/msgformat_format.c \ - msgformat/msgformat_parse.c \ - grapheme/grapheme_string.c \ - grapheme/grapheme_util.c \ - resourcebundle/resourcebundle.c \ - resourcebundle/resourcebundle_class.c \ - resourcebundle/resourcebundle_iterator.c \ - transliterator/transliterator_class.c \ - transliterator/transliterator_methods.c \ - uchar/uchar.c \ - idn/idn.c \ - spoofchecker/spoofchecker_class.c \ - spoofchecker/spoofchecker_create.c\ - spoofchecker/spoofchecker_main.c, $ext_shared,,$INTL_COMMON_FLAGS,cxx) + PHP_NEW_EXTENSION([intl], m4_normalize([ + collator/collator_attr.c + collator/collator_class.c + collator/collator_compare.c + collator/collator_convert.c + collator/collator_create.c + collator/collator_error.c + collator/collator_is_numeric.c + collator/collator_locale.c + collator/collator_sort.c + common/common_error.c + converter/converter.c + dateformat/dateformat_attr.c + dateformat/dateformat_class.c + dateformat/dateformat_data.c + dateformat/dateformat_format.c + dateformat/dateformat_parse.c + dateformat/dateformat.c + formatter/formatter_attr.c + formatter/formatter_class.c + formatter/formatter_data.c + formatter/formatter_format.c + formatter/formatter_main.c + formatter/formatter_parse.c + grapheme/grapheme_string.c + grapheme/grapheme_util.c + idn/idn.c + intl_convert.c + intl_error.c + locale/locale_class.c + locale/locale_methods.c + locale/locale.c + msgformat/msgformat_attr.c + msgformat/msgformat_class.c + msgformat/msgformat_data.c + msgformat/msgformat_format.c + msgformat/msgformat_parse.c + msgformat/msgformat.c + normalizer/normalizer_class.c + normalizer/normalizer_normalize.c + php_intl.c + resourcebundle/resourcebundle_class.c + resourcebundle/resourcebundle_iterator.c + resourcebundle/resourcebundle.c + spoofchecker/spoofchecker_class.c + spoofchecker/spoofchecker_create.c + spoofchecker/spoofchecker_main.c + transliterator/transliterator_class.c + transliterator/transliterator_methods.c + uchar/uchar.c + ]), + [$ext_shared],, + [$INTL_COMMON_FLAGS], + [cxx]) PHP_INTL_CXX_SOURCES="intl_convertcpp.cpp \ common/common_enum.cpp \ diff --git a/ext/json/config.m4 b/ext/json/config.m4 index 0d02dff2345..5879d061aad 100644 --- a/ext/json/config.m4 +++ b/ext/json/config.m4 @@ -1,8 +1,10 @@ -PHP_NEW_EXTENSION(json, - json.c \ - json_encoder.c \ - json_parser.tab.c \ - json_scanner.c, - no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) +PHP_NEW_EXTENSION([json], m4_normalize([ + json_encoder.c + json_parser.tab.c + json_scanner.c + json.c + ]), + [no],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) PHP_INSTALL_HEADERS([ext/json], [php_json.h php_json_parser.h php_json_scanner.h]) PHP_ADD_MAKEFILE_FRAGMENT diff --git a/ext/ldap/config.m4 b/ext/ldap/config.m4 index abd13bcb5d8..3de1471a128 100644 --- a/ext/ldap/config.m4 +++ b/ext/ldap/config.m4 @@ -51,7 +51,10 @@ PHP_ARG_WITH([ldap-sasl], if test "$PHP_LDAP" != "no"; then - PHP_NEW_EXTENSION(ldap, ldap.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + PHP_NEW_EXTENSION([ldap], + [ldap.c], + [$ext_shared],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) if test "$PHP_LDAP" = "yes"; then for i in /usr/local /usr; do diff --git a/ext/mbstring/config.m4 b/ext/mbstring/config.m4 index efd54fef195..ccc1d46e2a4 100644 --- a/ext/mbstring/config.m4 +++ b/ext/mbstring/config.m4 @@ -19,7 +19,10 @@ AC_DEFUN([PHP_MBSTRING_ADD_CFLAG], [ ]) AC_DEFUN([PHP_MBSTRING_EXTENSION], [ - PHP_NEW_EXTENSION(mbstring, $PHP_MBSTRING_BASE_SOURCES $PHP_MBSTRING_SOURCES, $ext_shared,, $PHP_MBSTRING_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + PHP_NEW_EXTENSION([mbstring], + [$PHP_MBSTRING_BASE_SOURCES $PHP_MBSTRING_SOURCES], + [$ext_shared],, + [$PHP_MBSTRING_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) PHP_SUBST([MBSTRING_SHARED_LIBADD]) for dir in $PHP_MBSTRING_EXTRA_BUILD_DIRS; do diff --git a/ext/mysqli/config.m4 b/ext/mysqli/config.m4 index b0a4794d73a..cb2e3b05751 100644 --- a/ext/mysqli/config.m4 +++ b/ext/mysqli/config.m4 @@ -63,7 +63,10 @@ if test "$PHP_MYSQLI" != "no"; then mysqli_sources="mysqli.c mysqli_api.c mysqli_prop.c mysqli_nonapi.c \ mysqli_report.c mysqli_driver.c mysqli_warning.c \ mysqli_exception.c mysqli_result_iterator.c" - PHP_NEW_EXTENSION(mysqli, $mysqli_sources, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + PHP_NEW_EXTENSION([mysqli], + [$mysqli_sources], + [$ext_shared],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) PHP_INSTALL_HEADERS([ext/mysqli], [php_mysqli_structs.h mysqli_mysqlnd.h]) PHP_ADD_EXTENSION_DEP(mysqli, mysqlnd) PHP_ADD_EXTENSION_DEP(mysqli, spl) diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4 index b332b9ff6b1..78d9df59f90 100644 --- a/ext/odbc/config.m4 +++ b/ext/odbc/config.m4 @@ -455,7 +455,10 @@ if test -n "$ODBC_TYPE"; then AC_SUBST([ODBC_LFLAGS]) AC_SUBST([ODBC_TYPE]) - PHP_NEW_EXTENSION(odbc, php_odbc.c odbc_utils.c, $ext_shared,, [$ODBC_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) + PHP_NEW_EXTENSION([odbc], + [php_odbc.c odbc_utils.c], + [$ext_shared],, + [$ODBC_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) else AC_MSG_CHECKING([for any ODBC driver support]) AC_MSG_RESULT([no]) diff --git a/ext/openssl/config0.m4 b/ext/openssl/config0.m4 index 0b2fe13b068..5d78dabe800 100644 --- a/ext/openssl/config0.m4 +++ b/ext/openssl/config0.m4 @@ -18,7 +18,7 @@ PHP_ARG_WITH([openssl-legacy-provider], [no]) if test "$PHP_OPENSSL" != "no"; then - PHP_NEW_EXTENSION(openssl, openssl.c xp_ssl.c, $ext_shared) + PHP_NEW_EXTENSION([openssl], [openssl.c xp_ssl.c], [$ext_shared]) PHP_SUBST([OPENSSL_SHARED_LIBADD]) PHP_SETUP_OPENSSL([OPENSSL_SHARED_LIBADD], [AC_DEFINE([HAVE_OPENSSL_EXT], [1], diff --git a/ext/pcntl/config.m4 b/ext/pcntl/config.m4 index c6a25171ec5..8a4a10d85e8 100644 --- a/ext/pcntl/config.m4 +++ b/ext/pcntl/config.m4 @@ -53,5 +53,9 @@ int main(void) { AC_CHECK_TYPE([siginfo_t],[PCNTL_CFLAGS="-DHAVE_STRUCT_SIGINFO_T"],,[#include ]) - PHP_NEW_EXTENSION(pcntl, pcntl.c php_signal.c, $ext_shared, cli, $PCNTL_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + PHP_NEW_EXTENSION([pcntl], + [pcntl.c php_signal.c], + [$ext_shared], + [cli], + [$PCNTL_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) fi diff --git a/ext/pdo/config.m4 b/ext/pdo/config.m4 index ed1533ea34c..06e9c8ef342 100644 --- a/ext/pdo/config.m4 +++ b/ext/pdo/config.m4 @@ -9,7 +9,9 @@ if test "$PHP_PDO" != "no"; then dnl Make sure $PHP_PDO is 'yes' when it's not 'no' :) PHP_PDO=yes - PHP_NEW_EXTENSION(pdo, pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c, $ext_shared) + PHP_NEW_EXTENSION([pdo], + [pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c], + [$ext_shared]) PHP_ADD_EXTENSION_DEP(pdo, spl) PHP_INSTALL_HEADERS([ext/pdo], m4_normalize([ pdo_sql_parser.h diff --git a/ext/pdo_dblib/config.m4 b/ext/pdo_dblib/config.m4 index 3fbd02ffce7..217199f8b1d 100644 --- a/ext/pdo_dblib/config.m4 +++ b/ext/pdo_dblib/config.m4 @@ -45,7 +45,10 @@ if test "$PHP_PDO_DBLIB" != "no"; then PHP_CHECK_PDO_INCLUDES PDO_DBLIB_DEFS="-DPDO_DBLIB_FLAVOUR=\\\"freetds\\\"" - PHP_NEW_EXTENSION(pdo_dblib, pdo_dblib.c dblib_driver.c dblib_stmt.c, $ext_shared,, $PDO_DBLIB_DEFS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + PHP_NEW_EXTENSION([pdo_dblib], + [pdo_dblib.c dblib_driver.c dblib_stmt.c], + [$ext_shared],, + [$PDO_DBLIB_DEFS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) PHP_SUBST([PDO_DBLIB_SHARED_LIBADD]) PHP_ADD_EXTENSION_DEP(pdo_dblib, pdo) diff --git a/ext/pdo_firebird/config.m4 b/ext/pdo_firebird/config.m4 index a70f7b50972..d3151029eba 100644 --- a/ext/pdo_firebird/config.m4 +++ b/ext/pdo_firebird/config.m4 @@ -50,7 +50,9 @@ if test "$PHP_PDO_FIREBIRD" != "no"; then PHP_CHECK_PDO_INCLUDES - PHP_NEW_EXTENSION(pdo_firebird, pdo_firebird.c firebird_driver.c firebird_statement.c, $ext_shared) + PHP_NEW_EXTENSION([pdo_firebird], + [pdo_firebird.c firebird_driver.c firebird_statement.c], + [$ext_shared]) PHP_SUBST([PDO_FIREBIRD_SHARED_LIBADD]) PHP_ADD_EXTENSION_DEP(pdo_firebird, pdo) fi diff --git a/ext/pdo_mysql/config.m4 b/ext/pdo_mysql/config.m4 index 4b3b79e3ada..1d42a971fad 100644 --- a/ext/pdo_mysql/config.m4 +++ b/ext/pdo_mysql/config.m4 @@ -85,7 +85,10 @@ if test "$PHP_PDO_MYSQL" != "no"; then AC_DEFINE_UNQUOTED(PDO_MYSQL_UNIX_ADDR, "$PDO_MYSQL_SOCKET", [ ]) fi - PHP_NEW_EXTENSION(pdo_mysql, pdo_mysql.c mysql_driver.c mysql_statement.c mysql_sql_parser.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + PHP_NEW_EXTENSION([pdo_mysql], + [pdo_mysql.c mysql_driver.c mysql_statement.c mysql_sql_parser.c], + [$ext_shared],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) PHP_ADD_EXTENSION_DEP(pdo_mysql, pdo) PHP_ADD_MAKEFILE_FRAGMENT diff --git a/ext/pdo_odbc/config.m4 b/ext/pdo_odbc/config.m4 index 869baead6a0..acd559d4fd9 100644 --- a/ext/pdo_odbc/config.m4 +++ b/ext/pdo_odbc/config.m4 @@ -141,7 +141,9 @@ functions required for PDO support. AC_DEFINE_UNQUOTED([PDO_ODBC_TYPE], ["$pdo_odbc_flavour"], [Define to the ODBC driver or driver manager value.]) - PHP_NEW_EXTENSION(pdo_odbc, pdo_odbc.c odbc_driver.c odbc_stmt.c, $ext_shared) + PHP_NEW_EXTENSION([pdo_odbc], + [pdo_odbc.c odbc_driver.c odbc_stmt.c], + [$ext_shared]) PHP_SUBST([PDO_ODBC_SHARED_LIBADD]) PHP_ADD_EXTENSION_DEP(pdo_odbc, pdo) fi diff --git a/ext/pdo_pgsql/config.m4 b/ext/pdo_pgsql/config.m4 index f5ebb2adf54..a8184140c9c 100644 --- a/ext/pdo_pgsql/config.m4 +++ b/ext/pdo_pgsql/config.m4 @@ -22,7 +22,9 @@ if test "$PHP_PDO_PGSQL" != "no"; then PHP_CHECK_PDO_INCLUDES - PHP_NEW_EXTENSION(pdo_pgsql, pdo_pgsql.c pgsql_driver.c pgsql_statement.c pgsql_sql_parser.c, $ext_shared) + PHP_NEW_EXTENSION([pdo_pgsql], + [pdo_pgsql.c pgsql_driver.c pgsql_statement.c pgsql_sql_parser.c], + [$ext_shared]) PHP_ADD_EXTENSION_DEP(pdo_pgsql, pdo) PHP_ADD_MAKEFILE_FRAGMENT fi diff --git a/ext/pdo_sqlite/config.m4 b/ext/pdo_sqlite/config.m4 index 071868b6c09..8cd6095078c 100644 --- a/ext/pdo_sqlite/config.m4 +++ b/ext/pdo_sqlite/config.m4 @@ -32,8 +32,9 @@ if test "$PHP_PDO_SQLITE" != "no"; then [$PDO_SQLITE_SHARED_LIBADD]) PHP_SUBST([PDO_SQLITE_SHARED_LIBADD]) - PHP_NEW_EXTENSION(pdo_sqlite, pdo_sqlite.c sqlite_driver.c sqlite_statement.c sqlite_sql_parser.c, - $ext_shared) + PHP_NEW_EXTENSION([pdo_sqlite], + [pdo_sqlite.c sqlite_driver.c sqlite_statement.c sqlite_sql_parser.c], + [$ext_shared]) PHP_ADD_EXTENSION_DEP(pdo_sqlite, pdo) PHP_ADD_MAKEFILE_FRAGMENT diff --git a/ext/pgsql/config.m4 b/ext/pgsql/config.m4 index 71a48042b1c..6d5c4701a63 100644 --- a/ext/pgsql/config.m4 +++ b/ext/pgsql/config.m4 @@ -41,6 +41,9 @@ if test "$PHP_PGSQL" != "no"; then CFLAGS=$old_CFLAGS - PHP_NEW_EXTENSION(pgsql, pgsql.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + PHP_NEW_EXTENSION([pgsql], + [pgsql.c], + [$ext_shared],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) PHP_ADD_EXTENSION_DEP(pgsql, pcre) fi diff --git a/ext/phar/config.m4 b/ext/phar/config.m4 index 4c279f1489a..923b01b15b1 100644 --- a/ext/phar/config.m4 +++ b/ext/phar/config.m4 @@ -5,7 +5,19 @@ PHP_ARG_ENABLE([phar], [yes]) if test "$PHP_PHAR" != "no"; then - PHP_NEW_EXTENSION(phar, util.c tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + PHP_NEW_EXTENSION([phar], m4_normalize([ + dirstream.c + func_interceptors.c + phar_object.c + phar_path_check.c + phar.c + stream.c + tar.c + util.c + zip.c + ]), + [$ext_shared],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) AC_MSG_CHECKING([for phar openssl support]) if test "$PHP_OPENSSL_SHARED" = "yes"; then AC_MSG_RESULT([no (shared openssl)]) diff --git a/ext/posix/config.m4 b/ext/posix/config.m4 index d9613452148..1bdac176676 100644 --- a/ext/posix/config.m4 +++ b/ext/posix/config.m4 @@ -6,7 +6,10 @@ PHP_ARG_ENABLE([posix], if test "$PHP_POSIX" = "yes"; then AC_DEFINE(HAVE_POSIX, 1, [whether to include POSIX-like functions]) - PHP_NEW_EXTENSION(posix, posix.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + PHP_NEW_EXTENSION([posix], + [posix.c], + [$ext_shared],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) AC_CHECK_FUNCS(m4_normalize([ ctermid diff --git a/ext/random/config.m4 b/ext/random/config.m4 index abaa912bb51..3812b013b2b 100644 --- a/ext/random/config.m4 +++ b/ext/random/config.m4 @@ -15,17 +15,19 @@ AC_CHECK_HEADERS([CommonCrypto/CommonRandom.h],,, [dnl dnl dnl Setup extension dnl -PHP_NEW_EXTENSION(random, - random.c \ - csprng.c \ - engine_combinedlcg.c \ - engine_mt19937.c \ - engine_pcgoneseq128xslrr64.c \ - engine_xoshiro256starstar.c \ - engine_secure.c \ - engine_user.c \ - gammasection.c \ - randomizer.c \ - zend_utils.c, - no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) +PHP_NEW_EXTENSION([random], m4_normalize([ + csprng.c + engine_combinedlcg.c + engine_mt19937.c + engine_pcgoneseq128xslrr64.c + engine_secure.c + engine_user.c + engine_xoshiro256starstar.c + gammasection.c + random.c + randomizer.c + zend_utils.c + ]), + [no],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) PHP_INSTALL_HEADERS([ext/random], [php_random.h php_random_csprng.h php_random_uint128.h]) diff --git a/ext/reflection/config.m4 b/ext/reflection/config.m4 index 2f295de9159..10ce256f01a 100644 --- a/ext/reflection/config.m4 +++ b/ext/reflection/config.m4 @@ -1 +1,4 @@ -PHP_NEW_EXTENSION(reflection, php_reflection.c, no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) +PHP_NEW_EXTENSION([reflection], + [php_reflection.c], + [no],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) diff --git a/ext/session/config.m4 b/ext/session/config.m4 index 043ff690b54..3ccbd117006 100644 --- a/ext/session/config.m4 +++ b/ext/session/config.m4 @@ -14,7 +14,10 @@ PHP_ARG_WITH([mm], if test "$PHP_SESSION" != "no"; then PHP_PWRITE_TEST PHP_PREAD_TEST - PHP_NEW_EXTENSION(session, mod_user_class.c session.c mod_files.c mod_mm.c mod_user.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + PHP_NEW_EXTENSION([session], + [mod_user_class.c session.c mod_files.c mod_mm.c mod_user.c], + [$ext_shared],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) dnl https://bugs.php.net/53141 PHP_ADD_EXTENSION_DEP(session, spl, true) PHP_SUBST([SESSION_SHARED_LIBADD]) diff --git a/ext/shmop/config.m4 b/ext/shmop/config.m4 index c5b1f84142c..55ae274c2e8 100644 --- a/ext/shmop/config.m4 +++ b/ext/shmop/config.m4 @@ -5,5 +5,5 @@ PHP_ARG_ENABLE([shmop], if test "$PHP_SHMOP" != "no"; then AC_DEFINE(HAVE_SHMOP, 1, [ ]) - PHP_NEW_EXTENSION(shmop, shmop.c, $ext_shared) + PHP_NEW_EXTENSION([shmop], [shmop.c], [$ext_shared]) fi diff --git a/ext/snmp/config.m4 b/ext/snmp/config.m4 index b8645ee53bf..3c95ff7ceeb 100644 --- a/ext/snmp/config.m4 +++ b/ext/snmp/config.m4 @@ -60,6 +60,6 @@ if test "$PHP_SNMP" != "no"; then [], [$SNMP_SHARED_LIBADD]) - PHP_NEW_EXTENSION(snmp, snmp.c, $ext_shared) + PHP_NEW_EXTENSION([snmp], [snmp.c], [$ext_shared]) PHP_SUBST([SNMP_SHARED_LIBADD]) fi diff --git a/ext/sockets/config.m4 b/ext/sockets/config.m4 index e393f4d8ad7..417624382ad 100644 --- a/ext/sockets/config.m4 +++ b/ext/sockets/config.m4 @@ -24,10 +24,9 @@ if test "$PHP_SOCKETS" != "no"; then case $host_alias in *darwin*) PHP_SOCKETS_CFLAGS="$PHP_SOCKETS_CFLAGS -D__APPLE_USE_RFC_3542" esac - PHP_NEW_EXTENSION( - [sockets], + PHP_NEW_EXTENSION([sockets], [sockets.c multicast.c conversions.c sockaddr_conv.c sendrecvmsg.c], [$ext_shared],, - $PHP_SOCKETS_CFLAGS) + [$PHP_SOCKETS_CFLAGS]) PHP_INSTALL_HEADERS([ext/sockets], [php_sockets.h]) fi diff --git a/ext/sodium/config.m4 b/ext/sodium/config.m4 index a2fa7108c0e..68b195e38fd 100644 --- a/ext/sodium/config.m4 +++ b/ext/sodium/config.m4 @@ -21,7 +21,10 @@ if test "$PHP_SODIUM" != "no"; then [SODIUM_COMPILER_FLAGS="$SODIUM_COMPILER_FLAGS -Wno-logical-op"],, [-Werror]) ]) - PHP_NEW_EXTENSION(sodium, libsodium.c sodium_pwhash.c, $ext_shared, , $SODIUM_COMPILER_FLAGS) + PHP_NEW_EXTENSION([sodium], + [libsodium.c sodium_pwhash.c], + [$ext_shared],, + [$SODIUM_COMPILER_FLAGS]) PHP_INSTALL_HEADERS([ext/sodium], [php_libsodium.h]) PHP_SUBST([SODIUM_SHARED_LIBADD]) fi diff --git a/ext/spl/config.m4 b/ext/spl/config.m4 index a1b3ca13b47..837d57ed53a 100644 --- a/ext/spl/config.m4 +++ b/ext/spl/config.m4 @@ -1,4 +1,17 @@ -PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c, no,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) +PHP_NEW_EXTENSION([spl], m4_normalize([ + php_spl.c + spl_array.c + spl_directory.c + spl_dllist.c + spl_exceptions.c + spl_fixedarray.c + spl_functions.c + spl_heap.c + spl_iterators.c + spl_observer.c + ]), + [no],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h spl_dllist.h spl_heap.h spl_fixedarray.h]) PHP_ADD_EXTENSION_DEP(spl, pcre, true) PHP_ADD_EXTENSION_DEP(spl, standard, true) diff --git a/ext/sqlite3/config0.m4 b/ext/sqlite3/config0.m4 index fba6464937e..308b9421d26 100644 --- a/ext/sqlite3/config0.m4 +++ b/ext/sqlite3/config0.m4 @@ -25,6 +25,9 @@ if test $PHP_SQLITE3 != "no"; then [have sqlite3 with extension support])], [$SQLITE3_SHARED_LIBADD]) - PHP_NEW_EXTENSION(sqlite3, sqlite3.c, $ext_shared,,-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + PHP_NEW_EXTENSION([sqlite3], + [sqlite3.c], + [$ext_shared],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) PHP_SUBST([SQLITE3_SHARED_LIBADD]) fi diff --git a/ext/standard/config.m4 b/ext/standard/config.m4 index de70af7d1c5..56a21c7173f 100644 --- a/ext/standard/config.m4 +++ b/ext/standard/config.m4 @@ -403,71 +403,71 @@ dnl dnl Setup extension sources dnl PHP_NEW_EXTENSION([standard], m4_normalize([ - array.c - assert.c - base64.c - basic_functions.c - browscap.c - crc32_x86.c - crc32.c - credits.c - crypt.c - css.c - datetime.c - dir.c - dl.c - dns.c - exec.c - file.c - filestat.c - filters.c - flock_compat.c - formatted_print.c - fsock.c - ftok.c - ftp_fopen_wrapper.c - head.c - hrtime.c - html.c - http_fopen_wrapper.c - http.c - image.c - incomplete_class.c - info.c - iptc.c - levenshtein.c - libavifinfo/avifinfo.c - link.c - mail.c - math.c - md5.c - metaphone.c - microtime.c - net.c - pack.c - pageinfo.c - password.c - php_fopen_wrapper.c - proc_open.c - quot_print.c - scanf.c - sha1.c - soundex.c - streamsfuncs.c - string.c - strnatcmp.c - syslog.c - type.c - uniqid.c - url_scanner_ex.c - url.c - user_filters.c - uuencode.c - var_unserializer.c - var.c - versioning.c - $php_ext_standard_sources -]),,, + array.c + assert.c + base64.c + basic_functions.c + browscap.c + crc32_x86.c + crc32.c + credits.c + crypt.c + css.c + datetime.c + dir.c + dl.c + dns.c + exec.c + file.c + filestat.c + filters.c + flock_compat.c + formatted_print.c + fsock.c + ftok.c + ftp_fopen_wrapper.c + head.c + hrtime.c + html.c + http_fopen_wrapper.c + http.c + image.c + incomplete_class.c + info.c + iptc.c + levenshtein.c + libavifinfo/avifinfo.c + link.c + mail.c + math.c + md5.c + metaphone.c + microtime.c + net.c + pack.c + pageinfo.c + password.c + php_fopen_wrapper.c + proc_open.c + quot_print.c + scanf.c + sha1.c + soundex.c + streamsfuncs.c + string.c + strnatcmp.c + syslog.c + type.c + uniqid.c + url_scanner_ex.c + url.c + user_filters.c + uuencode.c + var_unserializer.c + var.c + versioning.c + $php_ext_standard_sources + ]),,, [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) PHP_ADD_BUILD_DIR([$ext_builddir/libavifinfo]) diff --git a/ext/sysvmsg/config.m4 b/ext/sysvmsg/config.m4 index 4fed1dda907..d5f5ef9d053 100644 --- a/ext/sysvmsg/config.m4 +++ b/ext/sysvmsg/config.m4 @@ -8,5 +8,5 @@ if test "$PHP_SYSVMSG" != "no"; then [AC_MSG_ERROR([Cannot enable System V IPC support, sys/msg.h is missing])]) AC_DEFINE(HAVE_SYSVMSG, 1, [ ]) - PHP_NEW_EXTENSION(sysvmsg, sysvmsg.c, $ext_shared) + PHP_NEW_EXTENSION([sysvmsg], [sysvmsg.c], [$ext_shared]) fi diff --git a/ext/sysvsem/config.m4 b/ext/sysvsem/config.m4 index a6533ce7c26..dbe3bd8e3bf 100644 --- a/ext/sysvsem/config.m4 +++ b/ext/sysvsem/config.m4 @@ -4,7 +4,7 @@ PHP_ARG_ENABLE([sysvsem], [Enable System V semaphore support])]) if test "$PHP_SYSVSEM" != "no"; then - PHP_NEW_EXTENSION(sysvsem, sysvsem.c, $ext_shared) + PHP_NEW_EXTENSION([sysvsem], [sysvsem.c], [$ext_shared]) AC_DEFINE(HAVE_SYSVSEM, 1, [ ]) AC_CHECK_TYPES([union semun],,,[#include #include diff --git a/ext/sysvshm/config.m4 b/ext/sysvshm/config.m4 index bd6e40cca92..422f87e6bee 100644 --- a/ext/sysvshm/config.m4 +++ b/ext/sysvshm/config.m4 @@ -5,5 +5,5 @@ PHP_ARG_ENABLE([sysvshm], if test "$PHP_SYSVSHM" != "no"; then AC_DEFINE(HAVE_SYSVSHM, 1, [ ]) - PHP_NEW_EXTENSION(sysvshm, sysvshm.c, $ext_shared) + PHP_NEW_EXTENSION([sysvshm], [sysvshm.c], [$ext_shared]) fi diff --git a/ext/tidy/config.m4 b/ext/tidy/config.m4 index 461ac3e03ea..961ae0bbf1e 100644 --- a/ext/tidy/config.m4 +++ b/ext/tidy/config.m4 @@ -62,7 +62,7 @@ if test "$PHP_TIDY" != "no"; then dnl Add -Wno-ignored-qualifiers as this is an issue upstream TIDY_COMPILER_FLAGS="$TIDY_CFLAGS -Wno-ignored-qualifiers -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1" - PHP_NEW_EXTENSION(tidy, tidy.c, $ext_shared,, $TIDY_COMPILER_FLAGS) + PHP_NEW_EXTENSION([tidy], [tidy.c], [$ext_shared],, [$TIDY_COMPILER_FLAGS]) PHP_SUBST([TIDY_SHARED_LIBADD]) AC_DEFINE(HAVE_TIDY,1,[ ]) fi diff --git a/ext/tokenizer/config.m4 b/ext/tokenizer/config.m4 index e607fe50fc3..7a4955fe23d 100644 --- a/ext/tokenizer/config.m4 +++ b/ext/tokenizer/config.m4 @@ -5,6 +5,6 @@ PHP_ARG_ENABLE([tokenizer], [yes]) if test "$PHP_TOKENIZER" != "no"; then - PHP_NEW_EXTENSION(tokenizer, tokenizer.c tokenizer_data.c, $ext_shared) + PHP_NEW_EXTENSION([tokenizer], [tokenizer.c tokenizer_data.c], [$ext_shared]) PHP_ADD_MAKEFILE_FRAGMENT fi diff --git a/ext/xsl/config.m4 b/ext/xsl/config.m4 index 6eb8ac209b7..bc8565d7cf8 100644 --- a/ext/xsl/config.m4 +++ b/ext/xsl/config.m4 @@ -26,7 +26,7 @@ if test "$PHP_XSL" != "no"; then ], [ ]) AC_DEFINE(HAVE_XSL,1,[ ]) - PHP_NEW_EXTENSION(xsl, php_xsl.c xsltprocessor.c, $ext_shared) + PHP_NEW_EXTENSION([xsl], [php_xsl.c xsltprocessor.c], [$ext_shared]) PHP_SUBST([XSL_SHARED_LIBADD]) PHP_ADD_EXTENSION_DEP(xsl, libxml) PHP_ADD_EXTENSION_DEP(xsl, dom) diff --git a/ext/zend_test/config.m4 b/ext/zend_test/config.m4 index 1aff6f0e583..f49221b9fb6 100644 --- a/ext/zend_test/config.m4 +++ b/ext/zend_test/config.m4 @@ -4,5 +4,14 @@ PHP_ARG_ENABLE([zend-test], [Enable zend_test extension])]) if test "$PHP_ZEND_TEST" != "no"; then - PHP_NEW_EXTENSION(zend_test, test.c observer.c fiber.c iterators.c object_handlers.c zend_mm_custom_handlers.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + PHP_NEW_EXTENSION([zend_test], m4_normalize([ + fiber.c + iterators.c + object_handlers.c + observer.c + test.c + zend_mm_custom_handlers.c + ]), + [$ext_shared],, + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) fi diff --git a/ext/zip/config.m4 b/ext/zip/config.m4 index 6d528244759..1ced99eae7e 100644 --- a/ext/zip/config.m4 +++ b/ext/zip/config.m4 @@ -47,8 +47,7 @@ if test "$PHP_ZIP" != "no"; then AC_DEFINE(HAVE_ZIP,1,[ ]) - PHP_ZIP_SOURCES="php_zip.c zip_stream.c" - PHP_NEW_EXTENSION(zip, $PHP_ZIP_SOURCES, $ext_shared) + PHP_NEW_EXTENSION([zip], [php_zip.c zip_stream.c], [$ext_shared]) PHP_ADD_EXTENSION_DEP(zip, pcre) PHP_SUBST([ZIP_SHARED_LIBADD])