diff options
author | David Tardon <dtardon@redhat.com> | 2012-03-18 10:18:03 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2012-03-18 21:23:42 +0100 |
commit | 11bf220b6ab764906d9b2e0f4ed4f6830181c45b (patch) | |
tree | d93ce8a117d0fe21f19b24191ff7b61c4837f4f1 /configure.in | |
parent | c8aa3d756341b330051ed4a096a5bd28b67c19f4 (diff) |
mingw: test system icu version
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 14 |
1 files changed, 14 insertions, 0 deletions
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 |