[Freewnn-users 81] configure.in (--with-wnn-include=DIR)

藤原 誠/ Makoto Fujiwara makot****@ki*****
2011年 1月 2日 (日) 23:58:31 JST


>                                                    藤原 誠
こんにちは。
NetBSD/pkgsrc/inputmethod/ja-freewnn* は かなり古いので、何
とか 1.1.1-a021 まで新しくしようと思って、試行錯誤中です。

pkgsrc 的には、
本来一つのものを -server -lib -dict と分けようという努力もあっ
て、そのように合せて見ようと思ったり、やはり一つのままの方が簡
単かな、などとやっていて、自分の動作確認用途には一つの方を何と
か使えるようにして見ました。

それで、その分ける場合の方ですが、どうも --with-wnn-include=
を設定する必要があって、見ていました。

ですが、どうもそれが効かない(指定しても無視される)ような気がして、
configure を変更して見たりする訳ですが、それには configure.in
を少し変更して、autoconf (2.53) を使うと、どうも変です。

(僕の勘違いでなければ)、configure.in がこわれている気がします。
それで直そうと思ったのが添付の差分です。
  ---> うーん、やはり勘違いかも知れません。

(最後の方に一部 OS 対応追加も入っていますが、ごめんなさい)

SHA1 (FreeWnn-1.1.1-a021.tar.bz2) = 52fe5102674a68385b88c7503ca7c5cc33dfa6b7
RMD160 (FreeWnn-1.1.1-a021.tar.bz2) = 72d1b0233fd5f0253e9ff3cc42d087ed3c36da14
Size (FreeWnn-1.1.1-a021.tar.bz2) = 3108905 bytes
というものを使っている時の話です。
---
(藤原)
$NetBSD$

--- configure.in.orig	2005-11-28 02:30:23.000000000 +0900
+++ configure.in	2010-12-29 17:30:58.000000000 +0900
@@ -148,13 +148,13 @@
 
 AC_ARG_WITH(libwnn,
 [  --with-libwnn             use installed Wnn library [[default=no]]],
-[  with_libwnn="${withval}"
+[  with_libwnn="${withval}"],[])
 AC_ARG_WITH(wnn-includes,
 [  --with-wnn-includes=DIR   WNN include files are in DIR],
-[wnnincludedir="-I${withval}"], [wnnincludedir=''])
+[WNNINCLUDESRC="-I${withval}"], [WNNINCLUDESRC=''])
 AC_ARG_WITH(wnn-libraries,
 [  --with-wnn-libraries=DIR  Search for WNN libraries in DIR [[default=/usr/local/lib]]],
-[wnnlibdir="${withval}"], [wnnlibdir='/usr/local/lib'])
+[wnnlibdir="${withval}"
 	if test "X${with_libwnn}" = X-lwnn; then
 		WNNJLIB="-L${wnnlibdir} -lwnn"
 	elif test X"`echo ${with_libwnn} | grep '^/.*'`" != X ; then
@@ -165,23 +165,25 @@
 	DEPWNNJLIB=""
 	HINSI_DATA="\$(JWNNWNNDIR)/hinsi.data"
 ],
-[	WNNJLIB="\$(top_builddir)/Wnn/jlib/libwnn.la"
+[wnnlibdir='/usr/local/lib'
+	WNNJLIB="\$(top_builddir)/Wnn/jlib/libwnn.la"
 	DEPWNNJLIB="\$(WNNJLIB)"
 	HINSI_DATA="\$(top_builddir)/Wnn/jd/hinsi.data"
 ])
 AC_SUBST(WNNJLIB)
 AC_SUBST(DEPWNNJLIB)
 AC_SUBST(HINSI_DATA)
+AC_SUBST(WNNINCLUDESRC)
 
 AC_ARG_WITH(libcwnn,
 [  --with-libcwnn            use installed cWnn library [[default=no]]],
-[
+[  with_libcwnn="${withval}"],[])
 AC_ARG_WITH(cwnn-includes,
 [  --with-cwnn-includes=DIR  CWNN include files are in DIR],
-[cwnnincludedir="-I${withval}"], [cwnnincludedir=''])
+[CWNNINCLUDESRC="-I${withval}"], [CWNNINCLUDESRC=''])
 AC_ARG_WITH(cwnn-libraries,
 [  --with-cwnn-libraries=DIR Search for CWNN libraries in DIR [[default=/usr/local/lib]]],
-[cwnnlibdir="${withval}"], [cwnnlibdir='/usr/local/lib'])
+[cwnnlibdir="${withval}"
 	if test "X${with_libcwnn}" = X-lcwnn; then
 		CWNNJLIB="-L${cwnnlibdir} -lcwnn"
 	elif test X"`echo ${with_libcwnn} | grep '^/.*'`" != X ; then
@@ -193,7 +195,8 @@
 	CHINSI_DATA="\$(CWNNWNNDIR)/cixing.data"
 	THINSI_DATA="\$(TWNNTDSRC)/cixing.data"
 ],
-[	CWNNJLIB="\$(top_builddir)/cWnn/jlib/libcwnn.la"
+[	cwnnlibdir='/usr/local/lib'
+	CWNNJLIB="\$(top_builddir)/cWnn/jlib/libcwnn.la"
 	DEPCWNNJLIB="\$(CWNNJLIB)"
 	CHINSI_DATA="\$(CWNNCDSRC)/cixing.data"
 	THINSI_DATA="\$(TWNNTDSRC)/cixing.data"
@@ -202,16 +205,17 @@
 AC_SUBST(DEPCWNNJLIB)
 AC_SUBST(CHINSI_DATA)
 AC_SUBST(THINSI_DATA)
+AC_SUBST(CWNNINCLUDESRC)
 
 AC_ARG_WITH(libkwnn,
 [  --with-libkwnn            use installed kWnn library [[default=no]]],
-[
+[  with_libkwnn="${withval}"],[])
 AC_ARG_WITH(kwnn-includes,
 [  --with-kwnn-includes=DIR  KWNN include files are in DIR],
-[kwnnincludedir="-I${withval}"], [kwnnincludedir=''])
+[KWNNINCLUDESRC="-I${withval}"], [KWNNINCLUDESRC=''])
 AC_ARG_WITH(kwnn-libraries,
 [  --with-kwnn-libraries=DIR Search for KWNN libraries in DIR [[default=/usr/local/lib]]],
-[kwnnlibdir="${withval}"], [kwnnlibdir='/usr/local/lib'])
+[kwnnlibdir="${withval}"
 	if test "X${with_libkwnn}" = X-lkwnn; then
 		KWNNJLIB="-L${kwnnlibdir} -lkwnn"
 	elif test X"`echo ${with_libkwnn} | grep '^/.*'`" != X ; then
@@ -222,13 +226,15 @@
 	DEPKWNNJLIB=""
 	KHINSI_DATA="\$(KWNNWNNDIR)/hinsi.data"
 ],
-[	KWNNJLIB="\$(top_builddir)/kWnn/jlib/libkwnn.la"
+[	kwnnlibdir='/usr/local/lib'
+	KWNNJLIB="\$(top_builddir)/kWnn/jlib/libkwnn.la"
 	DEPKWNNJLIB="\$(KWNNJLIB)"
 	KHINSI_DATA="\$(KWNNKDSRC)/hinsi.data"
 ])
 AC_SUBST(KWNNJLIB)
 AC_SUBST(DEPKWNNJLIB)
 AC_SUBST(KHINSI_DATA)
+AC_SUBST(KWNNINCLUDESRC)
 
 dnl
 dnl Build Options
@@ -308,7 +314,19 @@
 	;;
 *-*-aix*)
     CCOPTIONS="-DSYSV"
-    ;;
+        ;;
+*-*-freebsd*|*-*-openbsd*)
+	CCOPTIONS="-DCSRG_BASED"
+	CDEBUGFLAGS="-O2 -fno-strength-reduce"
+	if test -x /usr/libexec/cpp; then
+	         CPP=/usr/libexec/cpp
+	fi
+	;;
+*-*-netbsd*|*-*-dragonfly*)
+	CCOPTIONS="-DCSRG_BASED"
+	CDEBUGFLAGS="-O2 -fno-strength-reduce"
+	CPP=/usr/bin/cpp
+	;;
 *)
 dnl    AC_MSG_WARN("It is not reported if FreeWnn works on this system.  But continuing...")
 dnl    AC_MSG_WARN([(It may or may not work if you set CCOPTIONS properly.)])




freewnn-users メーリングリストの案内