diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-04-01 22:57:46 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-04-01 22:57:46 +0200 |
commit | a655e5fcca4835a55992b3c9db792ed98bcb265a (patch) | |
tree | 0a70d0d5c01e1f2c97947c928fdb16213a774bb9 /configure.ac | |
parent | 6b27d3cc5974edd2b65c33fd11c11a9a6ee692a3 (diff) |
Use ICU for charset conversions
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 508e034..151f581 100644 --- a/configure.ac +++ b/configure.ac @@ -68,6 +68,27 @@ PKG_CHECK_MODULES([LIBXML],[ libxml-2.0 ]) +# ======== +# Find icu +# ======== +AS_IF([test "${ICU_CFLAGS+set}" = set],[ + ICU_CFLAGS_overriden=yes],[ + ICU_CFLAGS_overriden=no]) +PKG_CHECK_MODULES([ICU],[icu-i18n],[ + AS_IF([test "${ICU_CFLAGS_overriden}" = no], [ + ICU_CFLAGS="${ICU_CFLAGS} `${PKG_CONFIG} icu-i18n --variable=CXXFLAGS`"]) + ], [ + AC_PATH_PROG([ICU_CONFIG],[icu-config]) + AC_MSG_CHECKING([ICU installation]) + AS_IF([${ICU_CONFIG} --cflags >/dev/null 2>&1],[ + ICU_CFLAGS=`${ICU_CONFIG} --cppflags-searchpath --cxxflags` + ICU_LIBS=`${ICU_CONFIG} --ldflags` + AC_MSG_RESULT([found])],[ + AC_MSG_ERROR([libicu config program icu-config not found])])] +) +AC_SUBST(ICU_CFLAGS) +AC_SUBST(ICU_LIBS) + # ========= # Find zlib # ========= @@ -222,8 +243,8 @@ AS_IF([test "x$native_win32" = "xyes"], [ CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wshadow -pedantic" ]) ]) -LIBVISIO_CXXFLAGS="${WPD_CFLAGS} ${WPG_CFLAGS} ${LIBXML_CFLAGS} ${ZLIB_CFLAGS}" -LIBVISIO_LIBS="${WPD_LIBS} ${WPG_LIBS} ${LIBXML_LIBS} ${ZLIB_LIBS}" +LIBVISIO_CXXFLAGS="${WPD_CFLAGS} ${WPG_CFLAGS} ${LIBXML_CFLAGS} ${ZLIB_CFLAGS} ${ICU_CFLAGS}" +LIBVISIO_LIBS="${WPD_LIBS} ${WPG_LIBS} ${LIBXML_LIBS} ${ZLIB_LIBS} ${ICU_LIBS}" AC_SUBST(LIBVISIO_CXXFLAGS) AC_SUBST(LIBVISIO_LIBS) |