From 11bf220b6ab764906d9b2e0f4ed4f6830181c45b Mon Sep 17 00:00:00 2001 From: David Tardon Date: Sun, 18 Mar 2012 10:18:03 +0100 Subject: mingw: test system icu version --- configure.in | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'configure.in') diff --git a/configure.in b/configure.in index d194e86ded76..74037eb7a8cf 100644 --- a/configure.in +++ b/configure.in @@ -7436,6 +7436,20 @@ if test "$with_system_icu" = "yes"; then AC_MSG_ERROR([not suitable, only >= 4.0 supported currently]) fi + if test "$cross_compiling" = "yes" -a "$with_system_icu_for_build" = "yes"; then + AC_PATH_PROG([ICUCONFIG_FOR_BUILD], [icu-config], [], [$PATH:/usr/sbin:/sbin]) + ICU_VERSION_FOR_BUILD=`$ICUCONFIG_FOR_BUILD --noverify --version 2>/dev/null || $ICUCONFIG_FOR_BUILD --version` + ICU_MAJOR_FOR_BUILD=`echo $ICU_VERSION_FOR_BUILD | cut -d"." -f1` + ICU_MINOR_FOR_BUILD=`echo $ICU_VERSION_FOR_BUILD | cut -d"." -f2` + AC_CHECKING([if MinGW and system versions of ICU are compatible]) + if test "$ICU_MAJOR" -eq "$ICU_MAJOR_FOR_BUILD" -a "$ICU_MINOR" -eq "$ICU_MINOR_FOR_BUILD"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + AC_MSG_ERROR([system ICU is not version-compatible with MinGW ICU]) + fi + fi + if test "$cross_compiling" != "yes" -o "$with_system_icu_for_build" = "yes"; then # using the system icu tools can lead to version confusion, use the # ones from the build environment when cross-compiling -- cgit