config.w32: fix missing icule.lib and iculx.lib
authorJan Ehrhardt <github@ehrhardt.nl>
Thu, 24 Oct 2019 15:23:36 +0000 (17:23 +0200)
committerGitHub <noreply@github.com>
Thu, 24 Oct 2019 15:23:36 +0000 (17:23 +0200)
icule.lib and iculx.lib have been removed in ICU 58.1.
Add thesame checks as in https://github.com/php/php-src/blob/PHP-7.4/ext/intl/config.w32#L123

config.w32

index 929faaacb3a713dacea0e8ba47e845b7c3ef4609..e7f265db6beb95c3310fa10cfbbb1be426a4cf1f 100644 (file)
@@ -98,7 +98,14 @@ if (PHP_HTTP != "no") {
                AC_DEFINE("PHP_HTTP_HAVE_LIBICU", 1, "");
                AC_DEFINE("PHP_HTTP_HAVE_IDNA2003", 1, "");
                AC_DEFINE("PHP_HTTP_HAVE_IDNA2008", 1, "");
-               ADD_FLAG("LIBS_HTTP", "icuuc.lib icudt.lib icuin.lib icuio.lib icule.lib iculx.lib");
+               ADD_FLAG("LIBS_HTTP", "icuuc.lib icudt.lib icuin.lib icuio.lib");
+               /* Compat for ICU before 58.1.*/
+               if (CHECK_LIB("icule.lib", "http", PHP_HTTP)) {
+                       ADD_FLAG("LIBS_HTTP", "icule.lib");
+               }
+               if (CHECK_LIB("iculx.lib", "http", PHP_HTTP)) {
+                       ADD_FLAG("LIBS_HTTP", "iculx.lib");
+               }
        }
 
        if (PHP_CURL != "no") {