Skip to content

Commit d18b722

Browse files
committed
Merge branch 'PHP-8.4'
* PHP-8.4: Properly check for required icu4c libraries
2 parents a7aba35 + 0f5cc82 commit d18b722

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

ext/intl/config.w32

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
ARG_ENABLE("intl", "Enable internationalization support", "no");
44

55
if (PHP_INTL != "no") {
6-
if (CHECK_LIB("icuuc.lib", "intl", PHP_INTL) &&
6+
if (CHECK_LIB("icudt.lib", "intl", PHP_INTL) &&
7+
CHECK_LIB("icuin.lib", "intl", PHP_INTL) &&
8+
CHECK_LIB("icuio.lib", "intl", PHP_INTL) &&
9+
CHECK_LIB("icuuc.lib", "intl", PHP_INTL) &&
710
CHECK_HEADER_ADD_INCLUDE("unicode/utf.h", "CFLAGS_INTL")) {
811
// always build as shared - zend_strtod.c/ICU type conflict
912
EXTENSION("intl", "php_intl.c intl_convert.c intl_convertcpp.cpp intl_error.c ", true,
@@ -116,16 +119,9 @@ if (PHP_INTL != "no") {
116119
codepointiterator_methods.cpp ",
117120
"intl");
118121

119-
ADD_FLAG("LIBS_INTL", "icudt.lib icuin.lib icuio.lib");
120-
121122
/* Compat for ICU before 58.1.*/
122-
if (CHECK_LIB("icule.lib", "intl", PHP_INTL)) {
123-
ADD_FLAG("LIBS_INTL", "icule.lib");
124-
}
125-
if (CHECK_LIB("iculx.lib", "intl", PHP_INTL)) {
126-
ADD_FLAG("LIBS_INTL", "iculx.lib");
127-
}
128-
123+
CHECK_LIB("icule.lib", "intl", PHP_INTL);
124+
CHECK_LIB("iculx.lib", "intl", PHP_INTL);
129125
ADD_FLAG("CFLAGS_INTL", "/std:c++17 /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");
130126
} else {
131127
WARNING("intl not enabled; libraries and/or headers not found");

0 commit comments

Comments
 (0)