mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 19:27:11 +03:00
Add configure options to link dynamically with libmoses
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@2932 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
parent
53c56df23e
commit
7c1e287c71
@ -2,6 +2,8 @@
|
||||
# have all needed files, that a GNU package needs
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
# order is important here: build moses before moses-cmd
|
||||
if WITH_MERT
|
||||
MERT = mert
|
||||
|
@ -6,6 +6,9 @@
|
||||
/* define if the Boost::Thread library is available */
|
||||
#undef HAVE_BOOST_THREAD
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <getopt.h> header file. */
|
||||
#undef HAVE_GETOPT_H
|
||||
|
||||
@ -48,6 +51,10 @@
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
|
@ -3,11 +3,13 @@ AC_INIT(moses/src)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE(moses, 0.1)
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CXXCPP
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_PROG_RANLIB
|
||||
#AM_PROG_LIBTOOL
|
||||
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
AX_XMLRPC_C
|
||||
|
||||
|
@ -6,11 +6,8 @@ queryLexicalTable_SOURCES = queryLexicalTable.cpp
|
||||
|
||||
AM_CPPFLAGS = -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I$(top_srcdir)/moses/src $(BOOST_CPPFLAGS)
|
||||
|
||||
processPhraseTable_LDADD = -L$(top_srcdir)/moses/src -lmoses $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB)
|
||||
processPhraseTable_DEPENDENCIES = $(top_srcdir)/moses/src/libmoses.a
|
||||
processPhraseTable_LDADD = $(top_builddir)/moses/src/libmoses.la $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB)
|
||||
|
||||
processLexicalTable_LDADD = -L$(top_srcdir)/moses/src -lmoses $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB)
|
||||
processLexicalTable_DEPENDENCIES = $(top_srcdir)/moses/src/libmoses.a
|
||||
processLexicalTable_LDADD = $(top_builddir)/moses/src/libmoses.la $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB)
|
||||
|
||||
queryLexicalTable_LDADD = -L$(top_srcdir)/moses/src -lmoses $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB)
|
||||
queryLexicalTable_DEPENDENCIES = $(top_srcdir)/moses/src/libmoses.a
|
||||
queryLexicalTable_LDADD = $(top_builddir)/moses/src/libmoses.la $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB)
|
||||
|
@ -1,19 +1,16 @@
|
||||
if WITH_THREADS
|
||||
bin_PROGRAMS = moses mosesmt lmbrgrid
|
||||
bin_PROGRAMS = moses mosesmt lmbrgrid
|
||||
else
|
||||
bin_PROGRAMS = moses lmbrgrid
|
||||
bin_PROGRAMS = moses lmbrgrid
|
||||
endif
|
||||
|
||||
AM_CPPFLAGS = -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DUSE_HYPO_POOL -I$(top_srcdir)/moses/src $(BOOST_CPPFLAGS)
|
||||
|
||||
moses_SOURCES = Main.cpp mbr.cpp IOWrapper.cpp TranslationAnalysis.cpp LatticeMBR.cpp
|
||||
moses_LDADD = -L$(top_srcdir)/moses/src -lmoses $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB)
|
||||
moses_DEPENDENCIES = $(top_srcdir)/moses/src/libmoses.a
|
||||
|
||||
mosesmt_SOURCES = MainMT.cpp mbr.cpp IOWrapper.cpp TranslationAnalysis.cpp ThreadPool.cpp LatticeMBR.cpp
|
||||
mosesmt_LDADD = -L$(top_srcdir)/moses/src $(BOOST_LDFLAGS) -lmoses $(BOOST_THREAD_LIB)
|
||||
mosesmt_DEPENDENCIES = $(top_srcdir)/moses/src/libmoses.a
|
||||
moses_LDADD = $(top_builddir)/moses/src/libmoses.la $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB)
|
||||
|
||||
mosesmt_SOURCES = MainMT.cpp mbr.cpp IOWrapper.cpp TranslationAnalysis.cpp ThreadPool.cpp
|
||||
mosesmt_LDADD = $(top_builddir)/moses/src/libmoses.la $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB)
|
||||
|
||||
lmbrgrid_SOURCES = LatticeMBRGrid.cpp LatticeMBR.cpp IOWrapper.cpp
|
||||
lmbrgrid_LDADD = -L$(top_srcdir)/moses/src $(BOOST_LDFLAGS) -lmoses $(BOOST_THREAD_LIB)
|
||||
lmbrgrid_DEPENDENCIES = $(top_srcdir)/moses/src/libmoses.a
|
||||
|
||||
lmbrgrid_LDADD = $(top_builddir)/moses/src/libmoses.la $(BOOST_THREAD_LIB)
|
@ -1,6 +1,6 @@
|
||||
lib_LIBRARIES = libmoses.a
|
||||
lib_LTLIBRARIES = libmoses.la
|
||||
AM_CPPFLAGS = -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES $(BOOST_CPPFLAGS)
|
||||
libmoses_a_SOURCES = \
|
||||
libmoses_la_SOURCES = \
|
||||
BitmapContainer.cpp \
|
||||
ConfusionNet.cpp \
|
||||
DecodeGraph.cpp \
|
||||
@ -97,24 +97,24 @@ hypergraph.pb.cc: hypergraph.proto
|
||||
hypergraph.pb.h: hypergraph.proto
|
||||
@PROTOC@ --cpp_out=. $<
|
||||
|
||||
libmoses_a_SOURCES += rule.pb.cc hypergraph.pb.cc
|
||||
libmoses_la_SOURCES += rule.pb.cc hypergraph.pb.cc
|
||||
|
||||
endif
|
||||
|
||||
if SRI_LM
|
||||
libmoses_a_SOURCES += LanguageModelSRI.cpp
|
||||
libmoses_la_SOURCES += LanguageModelSRI.cpp
|
||||
endif
|
||||
|
||||
if IRST_LM
|
||||
libmoses_a_SOURCES += LanguageModelIRST.cpp
|
||||
libmoses_la_SOURCES += LanguageModelIRST.cpp
|
||||
endif
|
||||
|
||||
if RAND_LM
|
||||
libmoses_a_SOURCES += LanguageModelRandLM.cpp
|
||||
libmoses_la_SOURCES += LanguageModelRandLM.cpp
|
||||
endif
|
||||
|
||||
if INTERNAL_LM
|
||||
libmoses_a_SOURCES += LanguageModelInternal.cpp \
|
||||
libmoses_la_SOURCES += LanguageModelInternal.cpp \
|
||||
NGramCollection.cpp \
|
||||
NGramNode.cpp
|
||||
endif
|
||||
|
@ -30,6 +30,11 @@ then
|
||||
AUTOCONF=`which autoconf`
|
||||
fi
|
||||
|
||||
if [ -z "$LIBTOOLIZE" ]
|
||||
then
|
||||
LIBTOOLIZE=`which libtoolize`
|
||||
fi
|
||||
|
||||
|
||||
echo "Calling $ACLOCAL..."
|
||||
$ACLOCAL -I m4 || die "aclocal failed"
|
||||
@ -37,6 +42,9 @@ echo "Calling $AUTOCONF..."
|
||||
$AUTOCONF || die "autoconf failed"
|
||||
echo "Calling $AUTOMAKE..."
|
||||
$AUTOMAKE || die "automake failed"
|
||||
echo "Calling $LIBTOOLIZE"
|
||||
$LIBTOOLIZE || die "libtoolize failed"
|
||||
|
||||
|
||||
echo
|
||||
echo "You should now be able to configure and build:"
|
||||
|
Loading…
Reference in New Issue
Block a user