1
0
Fork 0
arangodb/m4/external.icu

88 lines
2.8 KiB
Plaintext

dnl -*- mode: Autoconf; -*-
dnl ----------------------------------------------------------------------------
dnl --SECTION-- ICU
dnl ----------------------------------------------------------------------------
AC_LANG(C)
tr_ICU="yes"
AC_ARG_WITH(icu-config,
AS_HELP_STRING([--with-icu-config=FILE], [where the icu-config program is located]),
[ICU_CONFIG="$withval"]
)
if test "x$tr_ICU" = xyes; then
AC_MSG_NOTICE([--------------------------------------------------------------------------------])
AC_MSG_NOTICE([CHECKING FOR ICU])
AC_MSG_NOTICE([--------------------------------------------------------------------------------])
dnl ----------------------------------------------------------------------------
dnl checks for the icu-config
dnl ----------------------------------------------------------------------------
if test "x$ICU_CONFIG" == "x" ; then
ICU_CONFIG="icu-config"
fi
AC_MSG_CHECKING([for ICU config program "${ICU_CONFIG}"])
if $ICU_CONFIG --exists > /dev/null 2>&1; then
AC_MSG_RESULT([yes])
ICU_CPPFLAGS="$($ICU_CONFIG --cppflags)"
ICU_LDFLAGS=""
ICU_LIBS="$($ICU_CONFIG --ldflags)"
AC_MSG_CHECKING([ICU version])
TRI_ICU_VERSION="$($ICU_CONFIG --version)"
AC_MSG_RESULT([${TRI_ICU_VERSION}])
else
AC_MSG_RESULT([error])
AC_MSG_ERROR([ICU config program "${ICU_CONFIG}" not found. Use supplied ICU from 3rdParty directory (--enable-all-in-one-icu).])
fi
ICU_CPPFLAGS="${ICU_CPPFLAGS} -DTRI_ICU_VERSION='\"${TRI_ICU_VERSION}\"'"
fi
CMAKE_ICU_VERSION="${TRI_ICU_VERSION}"
dnl ----------------------------------------------------------------------------
dnl add substitutions
dnl ----------------------------------------------------------------------------
AC_SUBST(ICU_CPPFLAGS)
AC_SUBST(ICU_LDFLAGS)
AC_SUBST(ICU_LIBS)
AC_SUBST(CMAKE_ICU_INCLUDE)
AC_SUBST(CMAKE_ICU_LIB_PATH)
AC_SUBST(CMAKE_ICU_LIBS)
AC_SUBST(CMAKE_ICU_VERSION)
dnl ----------------------------------------------------------------------------
dnl informational output
dnl ----------------------------------------------------------------------------
LIB_INFO="$LIB_INFO|."
if test "x$tr_ICU" = xyes; then
LIB_INFO="$LIB_INFO|ICU: system version"
LIB_INFO="$LIB_INFO|ICU VERSION: ${TRI_ICU_VERSION}"
LIB_INFO="$LIB_INFO|ICU_CPPFLAGS: ${ICU_CPPFLAGS}"
LIB_INFO="$LIB_INFO|ICU_LDFLAGS: ${ICU_LDFLAGS}"
LIB_INFO="$LIB_INFO|ICU_LIBS: ${ICU_LIBS}"
else
LIB_INFO="$LIB_INFO|ICU: disabled"
fi
LIB_INFO="$LIB_INFO|."
dnl ----------------------------------------------------------------------------
dnl --SECTION-- END-OF-FILE
dnl ----------------------------------------------------------------------------
dnl Local Variables:
dnl mode: outline-minor
dnl outline-regexp: "^\\(dnl --SECTION--\\)"
dnl End: