diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2013-03-13 22:40:26 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2013-03-13 22:49:49 +0100 |
commit | 0c9f4dcd83ad82a11c4a5545a06912b4df716fa6 (patch) | |
tree | f83d3d7dca16846629d868cc5814da32e3cb724c /configure.ac | |
parent | 38d3e115c159f19f22de73ece1abe609d75a041e (diff) |
do not use icu-config when cross-compiling, except for MinGW
It's not possible to run the executable for host platform in general.
Just accept system version without checking it.
Change-Id: I5ca3da1aca09b5bc3a6d25f0cdcb816f36498623
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac index 2c3d743b4e17..61b92ad1aece 100644 --- a/configure.ac +++ b/configure.ac @@ -8140,22 +8140,24 @@ if test "$with_system_icu" = "yes"; then AC_PREPROC_IFELSE([AC_LANG_SOURCE([[unicode/rbbi.h]])],[AC_MSG_RESULT(checked.)],[AC_MSG_ERROR(icu headers not found.)]) AC_LANG_POP([C++]) - ICUPATH="$PATH" - if test "$WITH_MINGW" = "yes"; then - ICUPATH=`$CC -print-sysroot`/mingw/bin:"$ICUPATH" - fi - AC_PATH_PROG(ICUCONFIG,icu-config,,[$ICUPATH]) + if test "$cross_compiling" != "yes" -o "$WITH_MINGW" = "yes"; then + ICUPATH="$PATH" + if test "$WITH_MINGW" = "yes"; then + ICUPATH=`$CC -print-sysroot`/mingw/bin:"$ICUPATH" + fi + AC_PATH_PROG(ICUCONFIG,icu-config,,[$ICUPATH]) - AC_MSG_CHECKING([ICU version]) - ICU_VERSION=`$ICUCONFIG --noverify --version 2>/dev/null || $ICUCONFIG --version` - ICU_MAJOR=`echo $ICU_VERSION | cut -d"." -f1` - ICU_MINOR=`echo $ICU_VERSION | cut -d"." -f2` - ICU_MICRO=`echo $ICU_VERSION | cut -d"." -f3` + AC_MSG_CHECKING([ICU version]) + ICU_VERSION=`$ICUCONFIG --noverify --version 2>/dev/null || $ICUCONFIG --version` + ICU_MAJOR=`echo $ICU_VERSION | cut -d"." -f1` + ICU_MINOR=`echo $ICU_VERSION | cut -d"." -f2` + ICU_MICRO=`echo $ICU_VERSION | cut -d"." -f3` - if test "$ICU_MAJOR" -ge "49" -o \( "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "2" \); then - AC_MSG_RESULT([OK, $ICU_VERSION]) - else - AC_MSG_ERROR([not suitable, only >= 4.2 supported currently]) + if test "$ICU_MAJOR" -ge "49" -o \( "$ICU_MAJOR" = "4" -a "$ICU_MINOR" -ge "2" \); then + AC_MSG_RESULT([OK, $ICU_VERSION]) + else + AC_MSG_ERROR([not suitable, only >= 4.2 supported currently]) + fi fi if test "$cross_compiling" = "yes" -a \( "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" \); then |