Bug 65053 - Add configure option to enable/disable ICU support
This commit is contained in:
parent
cf2c1c7eb8
commit
932b747147
12
configure.ac
12
configure.ac
@ -166,7 +166,14 @@ AM_CONDITIONAL(HAVE_CAIRO_FT, $have_cairo_ft)
|
||||
|
||||
dnl ==========================================================================
|
||||
|
||||
AC_ARG_WITH(icu,
|
||||
[AS_HELP_STRING([--with-icu=@<:@yes/no/auto@:>@],
|
||||
[Use ICU @<:@default=auto@:>@])],,
|
||||
[with_icu=auto])
|
||||
have_icu=false
|
||||
if test "x$with_icu" = "xyes" -o "x$with_icu" = "xauto"; then
|
||||
PKG_CHECK_MODULES(ICU, icu-uc, have_icu=true, have_icu=false)
|
||||
|
||||
dnl Fallback to icu-config if ICU pkg-config files could not be found
|
||||
if test "$have_icu" != "true"; then
|
||||
AC_CHECK_TOOL(ICU_CONFIG, icu-config, no)
|
||||
@ -185,7 +192,10 @@ if test "$have_icu" != "true"; then
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
||||
if test "x$with_icu" = "xyes" -a "x$have_icu" != "xtrue"; then
|
||||
AC_MSG_ERROR([icu support requested but icu-uc not found])
|
||||
fi
|
||||
if $have_icu; then
|
||||
CXXFLAGS="$CXXFLAGS `$PKG_CONFIG --variable=CXXFLAGS icu-uc`"
|
||||
AC_DEFINE(HAVE_ICU, 1, [Have ICU library])
|
||||
|
Loading…
Reference in New Issue
Block a user