Revision 04ae9361d2d529047e18403b8b4076f62567f02e authored by jdschroeder on 04 April 2007, 17:04:50 UTC, committed by jdschroeder on 04 April 2007, 17:04:50 UTC
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1335 1f5c12ca-751b-0410-a591-d2e778427230
1 parent b47d531
configure.in
AC_INIT(moses/src)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(moses, 0.1)
AC_PROG_CXX
AC_LANG_CPLUSPLUS
AC_PROG_RANLIB
#AM_PROG_LIBTOOL
AC_ARG_WITH(srilm,
[AC_HELP_STRING([--with-srilm=PATH], [(optional) path to SRI's LM toolkit])],
[with_srilm=$withval],
[with_srilm=no]
)
AC_ARG_WITH(irstlm,
[AC_HELP_STRING([--with-irstlm=PATH], [(optional) path to IRST's LM toolkit])],
[with_irstlm=$withval],
[with_irstlm=no]
)
AC_ARG_ENABLE(profiling,
[AC_HELP_STRING([--enable-profiling], [moses will dump profiling info])],
[CPPFLAGS="$CPPFLAGS -pg"; LDFLAGS="$LDFLAGS -pg" ]
)
AC_ARG_ENABLE(optimization,
[AC_HELP_STRING([--enable-optimization], [compile with -O3 flag])],
[CPPFLAGS="$CPPFLAGS -O3"; LDFLAGS="$LDFLAGS -O3" ]
)
AM_CONDITIONAL([INTERNAL_LM], false)
AM_CONDITIONAL([SRI_LM], false)
AM_CONDITIONAL([IRST_LM], false)
if test "x$with_srilm" != 'xno'
then
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I${with_srilm}/include"
AC_CHECK_HEADER(Ngram.h,
[AC_DEFINE([HAVE_SRILM], [], [flag for SRILM])],
[AC_MSG_ERROR([Cannot find SRILM!])])
LIB_SRILM="-loolm -ldstruct -lmisc"
# ROOT/lib/i686-m64/liboolm.a
# ROOT/lib/i686-m64/libdstruct.a
# ROOT/lib/i686-m64/libmisc.a
MY_ARCH=`${with_srilm}/sbin/machine-type`
LDFLAGS="$LDFLAGS -L${with_srilm}/lib/${MY_ARCH}"
LIBS="$LIBS $LIB_SRILM"
FMTLIBS="$FMTLIBS liboolm.a libdstruct.a libmisc.a"
AM_CONDITIONAL([SRI_LM], true)
fi
if test "x$with_irstlm" != 'xno'
then
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -I${with_irstlm}/include"
AC_CHECK_HEADER(n_gram.h,
[AC_DEFINE([HAVE_IRSTLM], [], [flag for IRSTLM])],
[AC_MSG_ERROR([Cannot find IRST-LM!])])
LIB_SRILM="-lirstlm"
LDFLAGS="$LDFLAGS -L${with_irstlm}/lib"
LIBS="$LIBS $LIB_SRILM"
FMTLIBS="$FMTLIBS libirstlm.a"
AM_CONDITIONAL([IRST_LM], true)
fi
LIBS="$LIBS -lz"
AC_OUTPUT(Makefile moses/src/Makefile moses-cmd/src/Makefile misc/Makefile)
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...