Skip to content

Commit 4851ac2

Browse files
committed
Sync HAVE_* definitions for extensions
This syncs missing build system gaps of some extensions' definitions being defined on Windows and some on *nix. To not cause too much divergence with the current default ext/skeleton template, they weren't removed even though they aren't used. Help texts are also synced a bit where possible. * HAVE_INTL (added to Autotools also) * HAVE_PDO_DBLIB (added to Windows build also) * HAVE_PDO_FIREBIRD (added to Windows build also) * HAVE_TOKENIZER (added to Autotools also)
1 parent 22c7250 commit 4851ac2

File tree

8 files changed

+9
-4
lines changed

8 files changed

+9
-4
lines changed

ext/intl/config.m4

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,6 @@ if test "$PHP_INTL" != "no"; then
117117
PHP_ADD_BUILD_DIR($ext_builddir/spoofchecker)
118118
PHP_ADD_BUILD_DIR($ext_builddir/breakiterator)
119119
PHP_ADD_BUILD_DIR($ext_builddir/uchar)
120+
121+
AC_DEFINE([HAVE_INTL], [1], [Whether the intl extension is available.])
120122
fi

ext/intl/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ if (PHP_INTL != "no") {
126126
}
127127

128128
ADD_FLAG("CFLAGS_INTL", "/EHsc /DUNISTR_FROM_CHAR_EXPLICIT=explicit /DUNISTR_FROM_STRING_EXPLICIT=explicit /DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 /DU_HIDE_OBSOLETE_UTF_OLD_H=1");
129-
AC_DEFINE("HAVE_INTL", 1, "Internationalization support enabled");
129+
AC_DEFINE("HAVE_INTL", 1, "Whether the intl extension is available.");
130130
} else {
131131
WARNING("intl not enabled; libraries and/or headers not found");
132132
}

ext/pdo_dblib/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ if test "$PHP_PDO_DBLIB" != "no"; then
4545

4646
PDO_DBLIB_DEFS="-DPDO_DBLIB_FLAVOUR=\\\"freetds\\\""
4747
PHP_NEW_EXTENSION(pdo_dblib, pdo_dblib.c dblib_driver.c dblib_stmt.c, $ext_shared,,-I$pdo_cv_inc_path $PDO_DBLIB_DEFS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
48-
AC_DEFINE(HAVE_PDO_DBLIB,1,[ ])
48+
AC_DEFINE([HAVE_PDO_DBLIB], [1], [Whether the pdo_dblib extension is available.])
4949
PHP_SUBST(PDO_DBLIB_SHARED_LIBADD)
5050

5151
PHP_ADD_EXTENSION_DEP(pdo_dblib, pdo)

ext/pdo_dblib/config.w32

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ if (PHP_PDO_DBLIB != "no") {
1313
EXTENSION("pdo_dblib", "pdo_dblib.c dblib_driver.c dblib_stmt.c", null, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
1414
ADD_FLAG('CFLAGS_PDO_DBLIB', "/D PDO_DBLIB_FLAVOUR=\\\"freetds\\\"");
1515
ADD_EXTENSION_DEP('pdo_dblib', 'pdo');
16+
AC_DEFINE('HAVE_PDO_DBLIB', 1, 'Whether the pdo_dblib extension is available.');
1617
} else {
1718
WARNING("pdo_dblib not enabled, libraries or headers not found")
1819
}

ext/pdo_firebird/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ if test "$PHP_PDO_FIREBIRD" != "no"; then
6060

6161
PHP_CHECK_PDO_INCLUDES
6262

63-
AC_DEFINE(HAVE_PDO_FIREBIRD,1,[ ])
63+
AC_DEFINE([HAVE_PDO_FIREBIRD], [1], [Whether the pdo_firebird extension is available.])
6464
PHP_NEW_EXTENSION(pdo_firebird, pdo_firebird.c firebird_driver.c firebird_statement.c, $ext_shared,,-I$pdo_cv_inc_path)
6565
PHP_SUBST(PDO_FIREBIRD_SHARED_LIBADD)
6666
PHP_ADD_EXTENSION_DEP(pdo_firebird, pdo)

ext/pdo_firebird/config.w32

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ if (PHP_PDO_FIREBIRD != "no") {
1111
) {
1212

1313
EXTENSION("pdo_firebird", "pdo_firebird.c firebird_driver.c firebird_statement.c");
14+
AC_DEFINE('HAVE_PDO_FIREBIRD', 1, 'Whether the pdo_firebird extension is available.');
1415
} else {
1516
WARNING("pdo_firebird not enabled; libraries and headers not found");
1617
}

ext/tokenizer/config.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ PHP_ARG_ENABLE([tokenizer],
77
if test "$PHP_TOKENIZER" != "no"; then
88
PHP_NEW_EXTENSION(tokenizer, tokenizer.c tokenizer_data.c, $ext_shared)
99
PHP_ADD_MAKEFILE_FRAGMENT
10+
AC_DEFINE([HAVE_TOKENIZER], [1], [Whether the tokenizer extension is available.])
1011
fi

ext/tokenizer/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ ARG_ENABLE("tokenizer", "tokenizer support", "yes");
44

55
if (PHP_TOKENIZER == "yes") {
66
EXTENSION("tokenizer", "tokenizer.c tokenizer_data.c");
7-
AC_DEFINE("HAVE_TOKENIZER", 1, "Tokenizer support");
7+
AC_DEFINE("HAVE_TOKENIZER", 1, "Whether the tokenizer extension is available.");
88
}

0 commit comments

Comments
 (0)