[libxml2] configure: check for icu DEFS



commit 0f04d5a12b051e82c990f5e821d7322a372421c8
Author: James Hilliard <james hilliard1 gmail com>
Date:   Tue Jan 18 14:22:24 2022 -0700

    configure: check for icu DEFS
    
    In some cases we need to add additional defs to build against icu if
    icu has certain options configured.
    
    ICU warns about this when building:
    
    *** WARNING: You must set the following flags before code compiled against this ICU will function 
properly:
    
        -DU_DISABLE_RENAMING=1
    
    We can fetch these flags from the icu pkgconfig and add them if
    required.
    
    This fixes symbol errors if ICU is built without renaming.
    
    Signed-off-by: James Hilliard <james hilliard1 gmail com>

 configure.ac | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/configure.ac b/configure.ac
index 667eee9e..0b33eda8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1256,6 +1256,13 @@ else
         [have_libicu=yes],
         [have_libicu=no])
 
+    if test "x$have_libicu" = "xyes"; then
+        PKG_CHECK_VAR([ICU_DEFS], [icu-i18n], [DEFS])
+        if test "x$ICU_DEFS" != "x"; then
+            CPPFLAGS="$CPPFLAGS $ICU_DEFS"
+        fi
+    fi
+
     # If pkg-config failed, fall back to AC_CHECK_LIB. This
     # will not pick up the necessary LIBS flags for liblzma's
     # private dependencies, though, so static linking may fail.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]