From 35381569403e90b8d34b223f524519521bc81598 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Wed, 27 Jun 2007 09:28:22 +0000 Subject: Engines rework - LibGuess support for far east language autodetection - Support for LibRCD 0.1.9 supporting ISO-8859-1 strings - Fixing wrong encodings names returned by Enca - Engine plugins naming scheme is altered - New API functions: rccEngineGetInfo, rccEngineGetAutoCharsetByName - Most of languages are no more hardcoded, but moved to the configuration - RCD engine is added to Belarusian language (I hope it should work) - Some encoding names are fixed in configuration - Support for external libiconv - Support for libcharset - Find UI interface language from LC_MESSAGES locale - Simple compilation fix (Thanx to D. Panov) --- configure.in | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 7f85408..ce87ce8 100644 --- a/configure.in +++ b/configure.in @@ -41,6 +41,10 @@ AC_ARG_ENABLE( bdb, [ --disable-bdb disable usage of berkeleydb for recodings caching],, disable_bdb="yes") +AC_ARG_ENABLE( force-system-iconv, + [ --enable-force-system-iconv force usage of iconv library from glibc],, + enable_force_system_iconv="no") + AC_PROG_CC AM_PROG_CC_C_O AC_PROG_INSTALL @@ -118,13 +122,35 @@ AC_CHECK_HEADER(dlfcn.h, [AC_CHECK_LIB(dl, dlopen, [ ]) ])]) + +EXTRA_LIBS="" +EXTERNAL_ICONV=no +HAVE_LIBCHARSET=no + +if test "x$enable_force_system_iconv" != "xyes"; then +AC_CHECK_LIB(iconv, iconv_open, [ + EXTERNAL_ICONV=yes + EXTRA_LIBS+=" -liconv" +]) +AC_CHECK_HEADER(libcharset.h, [AC_CHECK_LIB(charset, locale_charset, [ + AC_DEFINE(HAVE_LIBCHARSET,1,[Defines if libRCD is available]) + HAVE_LIBCHARSET=yes + EXTRA_LIBS+=" -lcharset" +])]) +fi +AM_CONDITIONAL(HAVE_LIBCHARSET, [ test "x$HAVE_LIBCHARSET" = "xyes" ]) +AC_SUBST(EXTRA_LIBS) + + RCD_LIBS="" RCD_INCLUDES="" HAVE_RCD=no ENCA_LIBS="" ENCA_INCLUDES="" HAVE_ENCA=no - +LIBGUESS_LIBS="" +LIBGUESS_INCLUDES="" +HAVE_LIBGUESS=no if test "x$enable_force_dynamic_engines" != "xyes"; then AC_CHECK_HEADER(librcd.h, [AC_CHECK_LIB(rcd, rcdGetRussianCharset, [ @@ -141,13 +167,23 @@ AC_CHECK_HEADER(enca.h, [AC_CHECK_LIB(enca, enca_analyse, [ ])]) fi +AC_CHECK_HEADER(libguess.h, [AC_CHECK_LIB(guess, guess_jp, [ + AC_DEFINE(HAVE_LIBGUESS,1,[Defines if libguess is available]) + LIBGUESS_LIBS="-lguess" + LIBGUESS_INCLUDES="" + HAVE_LIBGUESS=yes +])]) + AM_CONDITIONAL(HAVE_RCD, [ test "x$HAVE_RCD" = "xyes" ]) AM_CONDITIONAL(HAVE_ENCA, [ test "x$HAVE_ENCA" = "xyes" ]) +AM_CONDITIONAL(HAVE_LIBGUESS, [ test "x$HAVE_LIBGUESS" = "xyes" ]) AC_SUBST(RCD_LIBS) AC_SUBST(RCD_INCLUDES) AC_SUBST(ENCA_LIBS) AC_SUBST(ENCA_INCLUDES) +AC_SUBST(LIBGUESS_LIBS) +AC_SUBST(LIBGUESS_INCLUDES) USE_DLOPEN=no if test "x$HAVE_DLOPEN" = "xyes"; then @@ -272,13 +308,23 @@ AC_CHECK_FUNCS(strcasecmp strncasecmp strdup strnlen) AC_OUTPUT(src/Makefile engines/Makefile external/Makefile ui/Makefile examples/Makefile Makefile librcc.spec) +rccdir=${pkgdatadir} +while expr ${rccdir:0:1} == '$' &>/dev/null; do + rccdir=`eval echo $rccdir` +done + + echo "" echo "Configuration:" echo " POSIX Threading Support: $HAVE_PTHREAD" echo "" +echo " External IConv Library: $EXTERNAL_ICONV" +echo " LibCharset Library: $HAVE_LIBCHARSET" +echo "" echo " Dynamic Engine Loading Support: $HAVE_DLOPEN" echo " Enca Charset Detection Support: $HAVE_ENCA" echo " LibRCD Charset Detection Support: $HAVE_RCD" +echo " LibGUESS Charset Detection Support: $HAVE_LIBGUESS" echo "" echo " Multilanguage support with DB4: $HAVE_BDB" echo " Language autodetection using aspell: $HAVE_ASPELL" @@ -289,5 +335,8 @@ echo "User Interfaces:" echo " GTK User Interface: $HAVE_GTK" echo " GTK2 User Interface: $HAVE_GTK2" echo "" +echo "Directories:" +echo " RCC Data Directory: ${rccdir}" +echo "" echo "" echo "" -- cgit v1.2.3