mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
The current function `CHECK_HEADER_ADD_INCLUDE()` automatically defines `HAVE_<HEADER_NAME_H>` preprocessor macros, which makes it difficult to sync with other build systems. Specially, if some `HAVE_` macro is used in the code and this function defines this macro but Autotools doesn't. The new `CHECK_HEADER()` function behaves similar except it doesn't define the `HAVE_<HEADER_NAME_H>` preprocessor macro. This removes the following unused compile definitions: HAVE_ARGON2_H HAVE_AVIF_H HAVE_BZLIB_H HAVE_CAPSTONE_CAPSTONE_H HAVE_CURL_EASY_H HAVE_DB_H HAVE_DECODE_H HAVE_DEPOT_H HAVE_EDITLINE_READLINE_H HAVE_ENCHANT_H HAVE_ENCODE_H HAVE_FFI_H HAVE_FIREBIRD_INTERFACE_H HAVE_FT2BUILD_H HAVE_GD_H HAVE_GLIB_H HAVE_GMP_H HAVE_HTTPD_H HAVE_IBASE_H HAVE_IR_IR_H HAVE_KECCAKHASH_H HAVE_LBER_H HAVE_LDAP_H HAVE_LIBEXSLT_EXSLT_H HAVE_LIBINTL_H HAVE_LIBPQ_FE_H HAVE_LIBTIDY_TIDY_H HAVE_LIBXML_PARSER_H HAVE_LIBXML_TREE_H HAVE_LIBXML_XMLWRITER_H HAVE_LIBXSLT_XSLT_H HAVE_LMDB_H HAVE_MBSTRING_H HAVE_MYSQL_H HAVE_ONIGURUMA_H HAVE_OPENSSL_SSL_H HAVE_PNG_H HAVE_SNMP_H HAVE_SODIUM_H HAVE_SQLITE3_H HAVE_SQLITE3EXT_H HAVE_SYBFRONT_H HAVE_TIDY_H HAVE_TIDY_TIDY_H HAVE_TIDYBUFFIO_H HAVE_TIMELIB_CONFIG_H HAVE_UNICODE_USPOOF_H HAVE_UNICODE_UTF_H HAVE_XPM_H HAVE_ZIP_H HAVE_ZIPCONF_H HAVE_ZLIB_H The following compile definitions are defined explicitly: - HAVE_ICONV_H - HAVE_MSCOREE_H - HAVE_SQL_H - HAVE_SQLEXT_H Additionally, the `SETUP_OPENSSL()` function doesn't accept the 6th argument anymore.
29 lines
1.2 KiB
JavaScript
29 lines
1.2 KiB
JavaScript
// vim:ft=javascript
|
|
|
|
ARG_WITH("libxml", "LibXML support", "yes");
|
|
|
|
if (PHP_LIBXML == "yes") {
|
|
if (CHECK_LIB("libxml2_a_dll.lib;libxml2_a.lib", "libxml") &&
|
|
((PHP_ICONV != "no" && !PHP_ICONV_SHARED) || CHECK_LIB("libiconv_a.lib;iconv_a.lib;libiconv.lib;iconv.lib", "libxml")) &&
|
|
CHECK_HEADER("libxml/parser.h", "CFLAGS_LIBXML", PHP_PHP_BUILD + "\\include\\libxml2") &&
|
|
CHECK_HEADER("libxml/tree.h", "CFLAGS_LIBXML", PHP_PHP_BUILD + "\\include\\libxml2")) {
|
|
|
|
if (GREP_HEADER("libxml/xmlversion.h", "#define\\s+LIBXML_VERSION\\s+(\\d+)", PHP_PHP_BUILD + "\\include\\libxml2") &&
|
|
+RegExp.$1 >= 20904) {
|
|
|
|
EXTENSION("libxml", "libxml.c mime_sniff.c image_svg.c", false /* never shared */, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
|
|
AC_DEFINE("HAVE_LIBXML", 1, "Define to 1 if the PHP extension 'libxml' is available.");
|
|
ADD_FLAG("CFLAGS_LIBXML", "/D LIBXML_STATIC /D LIBXML_STATIC_FOR_DLL /D HAVE_WIN32_THREADS ");
|
|
if (!PHP_LIBXML_SHARED) {
|
|
ADD_DEF_FILE("ext\\libxml\\php_libxml2.def");
|
|
}
|
|
PHP_INSTALL_HEADERS("ext/libxml", "php_libxml.h");
|
|
} else {
|
|
WARNING("libxml support can't be enabled, libxml version >= 2.9.4 required");
|
|
}
|
|
} else {
|
|
WARNING("libxml support can't be enabled, iconv or libxml are missing")
|
|
PHP_LIBXML = "no"
|
|
}
|
|
}
|