Don't use icu-config when cross-compiling

This commit is contained in:
Behdad Esfahbod 2011-08-02 11:40:44 -04:00
parent 390dab49b6
commit e9c2341b13
1 changed files with 10 additions and 7 deletions

View File

@ -103,13 +103,16 @@ AM_CONDITIONAL(HAVE_CAIRO_FT, $have_cairo_ft)
dnl ========================================================================== dnl ==========================================================================
PKG_CHECK_MODULES(ICU, icu, have_icu=true, [ PKG_CHECK_MODULES(ICU, icu, have_icu=true, [
AC_CHECK_PROG([have_icu], [icu-config], [true], [false]) have_icu=false
if $have_icu; then if test $cross_compiling == no; then
icu_cflags=`icu-config --cppflags` AC_CHECK_PROG([have_icu], [icu-config], [true], [false])
icu_libs=`icu-config --ldflags-libsonly` if $have_icu; then
icu_cflags=`echo "$icu_cflags" | sed "s@ -I/usr/include @ @"` icu_cflags=`icu-config --cppflags`
AC_SUBST(ICU_CFLAGS, [$icu_cflags]) icu_libs=`icu-config --ldflags-libsonly`
AC_SUBST(ICU_LIBS, [$icu_libs]) icu_cflags=`echo "$icu_cflags" | sed "s@ -I/usr/include @ @"`
AC_SUBST(ICU_CFLAGS, [$icu_cflags])
AC_SUBST(ICU_LIBS, [$icu_libs])
fi
fi fi
]) ])
if $have_icu; then if $have_icu; then