dnl Copyright (c) 1991-2012 Kawahara Lab., Kyoto University dnl Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology dnl Copyright (c) 2005-2012 Julius project team, Nagoya Institute of Technology dnl All rights reserved AC_INIT(00readme.txt) AC_CONFIG_AUX_DIR(../support) dnl Checks for optimization flag AC_CANONICAL_HOST AC_MSG_CHECKING([host-specific optimization flag]) if test -z "$CFLAGS" ; then OPTFLAG=../support/cflags.${host_cpu}-${host_vendor}-${host_os} if test -f "$OPTFLAG" ; then . $OPTFLAG AC_MSG_RESULT([$OPTFLAG]) else AC_MSG_RESULT([no]) fi else AC_MSG_RESULT([skipped]) fi AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL AC_EXEEXT dnl Checks for optimization flag AC_MSG_CHECKING([host specific optimization flag]) if test -z "$CFLAGS" ; then OPTFLAG=../support/cflags.${host_cpu}-${host_vendor}-${host_os} if test -f "$OPTFLAG" ; then . $OPTFLAG AC_MSG_RESULT([$OPTFLAG]) else AC_MSG_RESULT([no]) fi else AC_MSG_RESULT([skipped]) fi AC_PATH_PROG(RM,rm) AC_PATH_PROG(PERL,perl) if test -z "$PERL"; then AC_MSG_ERROR([perl not found! installation terminated]) fi dnl AC_PATH_PROG(NKF, nkf) dnl if test -z "$NKF"; then dnl AC_MSG_ERROR([nkf not found! installation terminated]) dnl fi dnl not more use of bison and flex: use pre-compiled source instead dnl AC_PATH_PROG(BISON, bison) dnl if test -z "$BISON"; then dnl AC_MSG_ERROR([bison not found! installation terminated]) dnl fi dnl AC_PATH_PROG(FLEX, flex) dnl if test -z "$FLEX"; then dnl AC_MSG_ERROR([flex not found! installation terminated]) dnl fi AC_PATH_PROG(ICONV,iconv) if test -z "$ICONV"; then AC_MSG_WARN([no iconv, gram2sapixml.pl may not work]) else AC_MSG_CHECKING([for Jcode module in perl]) if $PERL -mJcode -e "print;"; then AC_MSG_RESULT([yes]) else AC_MSG_WARN([no Jcode module in perl, gram2sapixml.pl may not work]) fi fi dnl check for readline library for nextword have_readline=no READLINE_LIBS="" AC_CHECK_HEADER(readline/readline.h, AC_CHECK_LIB(readline, readline, have_readline=yes READLINE_LIBS="-lreadline", AC_MSG_CHECKING([for readline in -lreadline with -ltermcap]) ac_save_LIBS="$LIBS" LIBS="$ac_save_LIBS -lreadline -ltermcap" AC_TRY_LINK([#include #include ],[readline("");], AC_MSG_RESULT([yes]) READLINE_LIBS="-lreadline -ltermcap" LIBS="$ac_save_LIBS" have_readline=yes, AC_MSG_RESULT([no]) AC_MSG_CHECKING([for readline in -lreadline with -lncurses]) LIBS="$ac_save_LIBS -lreadline -lncurses" AC_TRY_LINK([#include #include ],[readline("");], AC_MSG_RESULT([yes]) READLINE_LIBS="-lreadline -lncurses" LIBS="$ac_save_LIBS" have_readline=yes, AC_MSG_RESULT([no]) READLINE_LIBS="" LIBS="$ac_save_LIBS" ) ) ) ) if test "$have_readline" = yes; then AC_DEFINE(HAVE_READLINE) dnl check some definition AC_MSG_CHECKING([for readline verion > 4.1]) AC_EGREP_HEADER(rl_compentry_func_t, readline/readline.h, AC_MSG_RESULT([yes]), AC_MSG_RESULT([no - use old func]) AC_DEFINE(HAVE_READLINE_4_1_OLDER) ) fi AC_SUBST(READLINE_LIBS) dnl check for malloc.h AC_CHECK_HEADERS(malloc.h) AC_OUTPUT(Makefile mkdfa/Makefile mkdfa/mkdfa.pl mkdfa/mkfa-1.44-flex/Makefile dfa_minimize/Makefile generate/Makefile accept_check/Makefile nextword/Makefile yomi2voca/Makefile yomi2voca/yomi2voca.pl gram2sapixml/Makefile gram2sapixml/gram2sapixml.pl dfa_determinize/Makefile)