diff options
author | Rene Engelhard <rene@debian.org> | 2017-09-18 11:43:51 +0200 |
---|---|---|
committer | Rene Engelhard <rene@debian.org> | 2017-09-18 12:12:47 +0200 |
commit | 050b1d0924aeaec6be5ca520617c5e511d99571a (patch) | |
tree | 4e891b4e7470529bfd321f475546175306067c25 /configure.ac | |
parent | 510b9557c37c666016c55e6ed2be7a50dbd1b67f (diff) |
use pkg-config --modversion to check for ICU version
... since icu-config is removed at least in Debians icu 59.1 packages.
icu-i18n exists since exactly 4.6 (which we require anyway) so we can
remove that check, too
Change-Id: I28bd1509dcc2c52e22f91fb26421fcd585323b24
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index 5f72318268ce..b4932349a165 100644 --- a/configure.ac +++ b/configure.ac @@ -8872,23 +8872,14 @@ if test "$with_system_icu" = "yes"; then AC_LANG_POP([C++]) if test "$cross_compiling" != "yes"; then - AC_PATH_PROG(ICUCONFIG,icu-config) - - AC_MSG_CHECKING([ICU version]) - ICU_VERSION=`$ICUCONFIG --noverify --version 2>/dev/null || $ICUCONFIG --version` + PKG_CHECK_MODULES(ICU, icu-i18n >= 4.6) + ICU_VERSION=`$PKG_CONFIG --modversion icu-i18n 2>/dev/null` ICU_MAJOR=`echo $ICU_VERSION | cut -d"." -f1` ICU_MINOR=`echo $ICU_VERSION | cut -d"." -f2` - - if test "$ICU_MAJOR" -ge "49" -o \( "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "6" \); then - AC_MSG_RESULT([OK, $ICU_VERSION]) - else - AC_MSG_ERROR([not suitable, only >= 4.6 supported currently]) - fi fi if test "$cross_compiling" = "yes" -a \( "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" \); 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_VERSION_FOR_BUILD=`$PKG_CONFIG --modversion icu-i18n 2>/dev/null` 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_MSG_CHECKING([if MinGW and system versions of ICU are compatible]) |