merge FLT
[m17n/m17n-lib.git] / configure.ac
index 8b4e301..9c84512 100644 (file)
@@ -23,12 +23,12 @@ dnl Boston, MA 02110-1301, USA.
 
 dnl Process this file with autoconf to produce a configure script.
 
-AC_INIT(m17n-lib, 1.3.5, m17n-lib-bug@m17n.org)
+AC_INIT(m17n-lib, 1.4.0, m17n-lib-bug@m17n.org)
 AM_INIT_AUTOMAKE
 AM_CONFIG_HEADER(src/config.h)
 AM_MAINTAINER_MODE
 
-API_VERSION=1:0:1
+API_VERSION=2:0:2
 AC_SUBST(API_VERSION)
 
 AM_GNU_GETTEXT
@@ -324,19 +324,14 @@ LIBS="$save_LIBS"
 AC_SUBST(XML2_LD_FLAGS)
 
 dnl Check for Anthy usability.
-AC_CHECK_LIB(anthydic, anthy_init_sessions, HAVE_ANTHY=yes, HAVE_ANTHY=no)
+
+PKG_CHECK_MODULES(ANTHY, anthy, HAVE_ANTHY=yes, HAVE_ANTHY=no)
 if test "x$HAVE_ANTHY" = "xyes"; then
-  AC_CHECK_LIB(anthy, anthy_init, HAVE_ANTHY=yes, HAVE_ANTHY=no, -lanthydic)
-  if test "x$HAVE_ANTHY" = "xyes"; then
-    AC_CHECK_HEADER(anthy/anthy.h, HAVE_ANTHY=yes, HAVE_ANTHY=no)
-    if test "x$HAVE_ANTHY" = "xyes"; then
-      AC_DEFINE(HAVE_ANTHY, 1,
-               [Define to 1 if you have Anthy library and header file])
-      M17N_EXT_LIBS="$M17N_EXT_LIBS anthy"
-      ANTHY_LD_FLAGS="-lanthy -lanthydic"
-      CONFIG_FLAGS="$CONFIG_FLAGS -DHAVE_ANTHY"
-    fi
-  fi
+  AC_DEFINE(HAVE_ANTHY, 1,
+          [Define to 1 if you have Anthy library and header file])
+  M17N_EXT_LIBS="$M17N_EXT_LIBS anthy"
+  ANTHY_LD_FLAGS="$ANTHY_LIBS"
+  CONFIG_FLAGS="$CONFIG_FLAGS -DHAVE_ANTHY"
 fi
 AC_SUBST(ANTHY_LD_FLAGS)
 
@@ -441,6 +436,7 @@ AC_CONFIG_FILES([Makefile po/Makefile.in intl/Makefile
                 m17n-config
                 m17n-core.pc
                 m17n-shell.pc
+                m17n-flt.pc
                 m17n-gui.pc
                 ])