ChaSen-2.3.3のコンパイル&インストール
ChaSenもshared libraryを作ります。結構はまります。参照したURLを挙げておきます。
- lib/chadic.hの修正
まずデリミタの修正を行います。Cygwinはどちらでも扱えるらしいんですが、気持ち悪いので直しちゃいます。
*** chadic.h.org --- chadic.h *************** *** 27,38 **** #define TRUE (!FALSE) #endif - #if defined _WIN32 - #define PATH_DELIMITER '\\' - #define PATHTYPE_MSDOS - #else #define PATH_DELIMITER '/' - #endif #define CHAINT_OFFSET 11 #define CHAINT_SCALE (256-CHAINT_OFFSET) --- 27,33 ----
- 次におなじみの呪文を唱えます。
/usr/autotool/devel/bin/aclocal /usr/autotool/devel/bin/automake --add-missing /usr/autotool/devel/bin/autoconf /usr/autotool/devel/bin/libtoolize --force
- configure.inを修正
*** configure.in.org --- configure.in *************** *** 6,11 **** --- 6,12 ---- AC_PROG_CC AC_PROG_CXX + AC_LIBTOOL_WIN32_DLL AM_PROG_LIBTOOL # Before making a release, the LTVERSION string should be modified. # The string is of the form C:R:A. *************** *** 19,24 **** --- 20,26 ---- dnl Checks for programs. AC_ISC_POSIX + AC_CYGWIN AC_PROG_INSTALL AC_PROG_MAKE_SET
- また呪文
/usr/autotool/devel/bin/automake /usr/autotool/devel/bin/autoconf ./configure --with-libconv=/usr/lib
- Makefile類を手動で変更します。Makefile.inを修正すればいいんでしょうが、./configureがlibconvを見つけてくれないでしょうがありません。うまいやり方ご存知の方、教えてください。
LDFLAGS = -no-undefined -W1,--export-all-symbols LIBS = -liconv -lstdc++
- config.hを修正
*** config.h.org Wed Feb 18 14:50:28 2004 --- config.h Wed Feb 18 14:50:57 2004 *************** *** 21,27 **** #define HAVE_IO_H 1 /* Define to 1 if you have the `iconv' library (-liconv). */ ! /* #undef HAVE_LIBICONV */ /* Define to 1 if you have theheader file. */ #define HAVE_LIMITS_H 1 --- 21,27 ---- #define HAVE_IO_H 1 /* Define to 1 if you have the `iconv' library (- liconv). */ ! #define HAVE_LIBICONV 1 /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 *************** *** 30,36 **** /* #undef HAVE_MEMORY_H */ /* Define to 1 if you have a working `mmap' system call. */ ! /* #undef HAVE_MMAP */ /* Define to 1 if you have the header file. */ #define HAVE_NETINET_IN_H 1 --- 30,36 ---- /* #undef HAVE_MEMORY_H */ /* Define to 1 if you have a working `mmap' system call. */ ! #define HAVE_MMAP 1 /* Define to 1 if you have the header file. */ #define HAVE_NETINET_IN_H 1
- 後はmakeするだけです。
make make install