configure.ac - check for the present of icu 52.1 or higher

This commit is contained in:
Amit D 2018-04-17 12:05:50 +03:00 committed by GitHub
parent a07ee5c40b
commit 98747b37ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -462,12 +462,13 @@ fi
AM_CONDITIONAL([ENABLE_TRAINING], true)
# Check location of icu headers
PKG_CHECK_MODULES([ICU_UC], [icu-uc], [have_icu_uc=true], [have_icu_uc=false])
PKG_CHECK_MODULES([ICU_I18N], [icu-i18n], [have_icu_i18n=true], [have_icu_i18n=false])
PKG_CHECK_MODULES([ICU_UC], [icu-uc >= 52.1], [have_icu_uc=true], [have_icu_uc=false])
PKG_CHECK_MODULES([ICU_I18N], [icu-i18n >= 52.1], [have_icu_i18n=true], [have_icu_i18n=false])
if !($have_icu_uc && $have_icu_i18n); then
AC_CHECK_HEADERS([unicode/uchar.h], [have_icu=true], [have_icu=false])
if !($have_icu); then
AC_MSG_WARN([Training tools WILL NOT be built because of missing icu library.])
AC_MSG_WARN([icu 52.1 or higher is required, but was not found.])
AC_MSG_WARN([Training tools WILL NOT be built.])
AC_MSG_WARN([Try to install libicu-devel package.])
AM_CONDITIONAL([ENABLE_TRAINING], false)
else