[Kazehakase-cvs] CVS update: kazehakase

Zurück zum Archiv-Index

Kouhei Sutou kous****@users*****
Tue Jan 9 13:15:41 JST 2007


Index: kazehakase/ChangeLog
diff -u kazehakase/ChangeLog:1.1892 kazehakase/ChangeLog:1.1893
--- kazehakase/ChangeLog:1.1892	Mon Jan  8 22:58:40 2007
+++ kazehakase/ChangeLog	Tue Jan  9 13:15:41 2007
@@ -1,3 +1,8 @@
+2007-01-09  Kouhei Sutou  <kou****@cozmi*****>
+
+	* configure.in: kz-anthy-trainer is available only if both of
+	Anthy and Mecab are available.
+
 2007-01-08  Kouhei Sutou  <kou****@cozmi*****>
 
 	* src/libegg/regex/eggregex.c (copy_replacement): removed an
Index: kazehakase/configure.in
diff -u kazehakase/configure.in:1.180 kazehakase/configure.in:1.181
--- kazehakase/configure.in:1.180	Sun Jan  7 19:42:30 2007
+++ kazehakase/configure.in	Tue Jan  9 13:15:41 2007
@@ -663,13 +663,29 @@
 anthy_exists=no
 PKG_CHECK_MODULES(ANTHY, anthy,
                   [anthy_exists=yes], [anthy_exists=no])
-AM_CONDITIONAL([WITH_ANTHY], [test "$anthy_exists" = "yes"])
-MECAB_LIBS=`mecab-config --libs`
-MECAB_CFLAGS=`mecab-config --cflags`
+
+AC_PATH_PROG(MECAB_CONFIG, mecab-config, "none")
+if test x"$MECAB_CONFIG" = x"none"; then
+  mecab_exists=no
+  MECAB_LIBS=""
+  MECAB_CFLAGS=""
+else
+  mecab_exists=yes
+  MECAB_LIBS=`$MECAB_CONFIG --libs`
+  MECAB_CFLAGS=`$MECAB_CONFIG --cflags`
+fi
 AC_SUBST([MECAB_CFLAGS])
 AC_SUBST([MECAB_LIBS])
-if test x"$anthy_exists" = "xyes"; then
-  AC_DEFINE(WITH_ANTHY, 1, [Define including Anthy hugahoge])
+
+if test x"$anthy_exists" = "xyes" -a x"$mecab_exists" = "xyes" ; then
+  anthy_available="yes"
+else
+  anthy_available="no"
+fi
+
+AM_CONDITIONAL([WITH_ANTHY], [test x"$anthy_available" = "xyes"])
+if test x"$anthy_available" = "xyes" ; then
+  AC_DEFINE(WITH_ANTHY, 1, [Define to 1 if Anthy and Mecab is found])
 fi
 
 AC_SUBST([AM_CPPFLAGS])


More information about the Kazehakase-cvs mailing list
Zurück zum Archiv-Index