mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 19:27:11 +03:00
Fix --enable-shared compilation.
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@3796 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
parent
98495fc02c
commit
a596b48971
@ -2,8 +2,8 @@ bin_PROGRAMS = CreateOnDiskPt
|
||||
CreateOnDiskPt_SOURCES = Main.cpp
|
||||
AM_CPPFLAGS = -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DUSE_HYPO_POOL -I$(top_srcdir)/moses/src $(BOOST_CPPFLAGS)
|
||||
|
||||
CreateOnDiskPt_LDADD = -L$(top_srcdir)/OnDiskPt/src -L$(top_srcdir)/moses/src -lOnDiskPt -lmoses
|
||||
CreateOnDiskPt_DEPENDENCIES = $(top_srcdir)/OnDiskPt/src/libOnDiskPt.a $(top_srcdir)/moses/src/libmoses.la
|
||||
CreateOnDiskPt_LDADD = -L$(top_srcdir)/OnDiskPt/src -L$(top_srcdir)/moses/src -lOnDiskPt -lmoses @KENLM_LDFLAGS@
|
||||
CreateOnDiskPt_DEPENDENCIES = $(top_srcdir)/OnDiskPt/src/libOnDiskPt.a $(top_srcdir)/moses/src/libmoses.la @KENLM_DEPS@
|
||||
|
||||
|
||||
|
||||
|
@ -11,4 +11,4 @@ endif
|
||||
if WITH_SERVER
|
||||
SERVER = server
|
||||
endif
|
||||
SUBDIRS = moses/src moses-chart/src OnDiskPt/src kenlm moses-cmd/src misc moses-chart-cmd/src CreateOnDisk/src $(MERT) $(SERVER)
|
||||
SUBDIRS = kenlm moses/src moses-chart/src OnDiskPt/src moses-cmd/src misc moses-chart-cmd/src CreateOnDisk/src $(MERT) $(SERVER)
|
||||
|
12
configure.in
12
configure.in
@ -197,12 +197,16 @@ then
|
||||
[AC_DEFINE([HAVE_KENLM], [], [flag for KENLM])],
|
||||
[AC_MSG_ERROR([Cannot find KEN-LM in ${PWD}/kenlm])])
|
||||
|
||||
LIB_KENLM="-lkenlm"
|
||||
LDFLAGS="$LDFLAGS -L${PWD}/kenlm"
|
||||
LIBS="$LIBS $LIB_KENLM"
|
||||
FMTLIBS="$FMTLIBS libkenlm.a"
|
||||
KENLM_LDFLAGS="-L\$(top_srcdir)/kenlm -lkenlm -lz"
|
||||
KENLM_DEPS="\$(top_srcdir)/kenlm/libkenlm.la"
|
||||
FMTLIBS="$FMTLIBS libkenlm.la"
|
||||
AM_CONDITIONAL([KEN_LM], true)
|
||||
else
|
||||
KENLM_LDFLAGS=""
|
||||
KENLM_DEPS=""
|
||||
fi
|
||||
AC_SUBST(KENLM_LDFLAGS)
|
||||
AC_SUBST(KENLM_DEPS)
|
||||
|
||||
if test "x$with_randlm" != 'xno'
|
||||
then
|
||||
|
@ -1,8 +1,8 @@
|
||||
lib_LIBRARIES = libkenlm.a
|
||||
lib_LTLIBRARIES = libkenlm.la
|
||||
bin_PROGRAMS = query build_binary
|
||||
|
||||
AM_CPPFLAGS = -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES $(BOOST_CPPFLAGS)
|
||||
libkenlm_a_SOURCES = \
|
||||
libkenlm_la_SOURCES = \
|
||||
lm/lm_exception.cc \
|
||||
lm/config.cc \
|
||||
lm/model.cc \
|
||||
@ -24,10 +24,8 @@ libkenlm_a_SOURCES = \
|
||||
util/bit_packing.cc
|
||||
|
||||
query_SOURCES = lm/ngram_query.cc
|
||||
query_DEPENDENCIES = libkenlm.a
|
||||
query_LDADD = -L$(top_srcdir)/kenlm -lkenlm -lz
|
||||
query_LDADD = libkenlm.la
|
||||
|
||||
build_binary_SOURCES = lm/build_binary.cc
|
||||
build_binary_DEPENDENCIES = libkenlm.a
|
||||
build_binary_LDADD = -L$(top_srcdir)/kenlm -lkenlm -lz
|
||||
build_binary_LDADD = libkenlm.la
|
||||
|
||||
|
@ -35,17 +35,11 @@
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef HAVE_ICU
|
||||
U_NAMESPACE_BEGIN
|
||||
#endif
|
||||
|
||||
std::ostream& operator<<(std::ostream& o, const StringPiece& piece) {
|
||||
o.write(piece.data(), static_cast<std::streamsize>(piece.size()));
|
||||
return o;
|
||||
}
|
||||
|
||||
#ifdef HAVE_BOOST
|
||||
size_t hash_value(const StringPiece &str) {
|
||||
return boost::hash_range(str.data(), str.data() + str.length());
|
||||
|
@ -56,13 +56,14 @@
|
||||
#include <cstring>
|
||||
#include <iosfwd>
|
||||
|
||||
#include <ostream>
|
||||
|
||||
#ifdef HAVE_ICU
|
||||
#include <unicode/stringpiece.h>
|
||||
U_NAMESPACE_BEGIN
|
||||
#else
|
||||
|
||||
#include <algorithm>
|
||||
#include <ostream>
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
|
||||
@ -228,7 +229,9 @@ inline bool operator>=(const StringPiece& x, const StringPiece& y) {
|
||||
}
|
||||
|
||||
// allow StringPiece to be logged (needed for unit testing).
|
||||
extern std::ostream& operator<<(std::ostream& o, const StringPiece& piece);
|
||||
inline std::ostream& operator<<(std::ostream& o, const StringPiece& piece) {
|
||||
return o.write(piece.data(), static_cast<std::streamsize>(piece.size()));
|
||||
}
|
||||
|
||||
#ifdef HAVE_BOOST
|
||||
size_t hash_value(const StringPiece &str);
|
||||
|
@ -7,10 +7,10 @@ queryPhraseTable_SOURCES = queryPhraseTable.cpp
|
||||
|
||||
AM_CPPFLAGS = -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I$(top_srcdir)/moses/src $(BOOST_CPPFLAGS)
|
||||
|
||||
processPhraseTable_LDADD = $(top_builddir)/moses/src/libmoses.la $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB) -L$(top_srcdir)/moses/src -L$(top_srcdir)/OnDiskPt/src -lmoses -lOnDiskPt
|
||||
processPhraseTable_LDADD = $(top_builddir)/moses/src/libmoses.la $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB) -L$(top_srcdir)/moses/src -L$(top_srcdir)/OnDiskPt/src -lmoses -lOnDiskPt @KENLM_LDFLAGS@
|
||||
|
||||
processLexicalTable_LDADD = $(top_builddir)/moses/src/libmoses.la $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB) -L$(top_srcdir)/moses/src -L$(top_srcdir)/OnDiskPt/src -lmoses -lOnDiskPt
|
||||
processLexicalTable_LDADD = $(top_builddir)/moses/src/libmoses.la $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB) -L$(top_srcdir)/moses/src -L$(top_srcdir)/OnDiskPt/src -lmoses -lOnDiskPt @KENLM_LDFLAGS@
|
||||
|
||||
queryLexicalTable_LDADD = $(top_builddir)/moses/src/libmoses.la $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB) -L$(top_srcdir)/moses/src -L$(top_srcdir)/OnDiskPt/src -lmoses -lOnDiskPt
|
||||
queryLexicalTable_LDADD = $(top_builddir)/moses/src/libmoses.la $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB) -L$(top_srcdir)/moses/src -L$(top_srcdir)/OnDiskPt/src -lmoses -lOnDiskPt @KENLM_LDFLAGS@
|
||||
|
||||
queryPhraseTable_LDADD = $(top_builddir)/moses/src/libmoses.la $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB) -L$(top_srcdir)/moses/src -L$(top_srcdir)/OnDiskPt/src -lmoses -lOnDiskPt
|
||||
queryPhraseTable_LDADD = $(top_builddir)/moses/src/libmoses.la $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB) -L$(top_srcdir)/moses/src -L$(top_srcdir)/OnDiskPt/src -lmoses -lOnDiskPt @KENLM_LDFLAGS@
|
||||
|
@ -2,8 +2,8 @@ bin_PROGRAMS = moses_chart
|
||||
moses_chart_SOURCES = Main.cpp mbr.cpp IOWrapper.cpp TranslationAnalysis.cpp
|
||||
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_chart_LDADD = -L$(top_srcdir)/moses/src -L$(top_srcdir)/moses-chart/src -L$(top_srcdir)/OnDiskPt/src -lmoses -lmoses-chart -lOnDiskPt $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB)
|
||||
moses_chart_DEPENDENCIES = $(top_srcdir)/moses/src/libmoses.la $(top_srcdir)/moses-chart/src/libmoses-chart.a $(top_srcdir)/OnDiskPt/src/libOnDiskPt.a
|
||||
moses_chart_LDADD = -L$(top_srcdir)/moses/src -L$(top_srcdir)/moses-chart/src -L$(top_srcdir)/OnDiskPt/src -lmoses -lmoses-chart -lOnDiskPt $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB) @KENLM_LDFLAGS@
|
||||
moses_chart_DEPENDENCIES = $(top_srcdir)/moses/src/libmoses.la $(top_srcdir)/moses-chart/src/libmoses-chart.a $(top_srcdir)/OnDiskPt/src/libOnDiskPt.a @KENLM_DEPS@
|
||||
|
||||
|
||||
|
||||
|
@ -3,11 +3,11 @@ bin_PROGRAMS = moses lmbrgrid checkplf
|
||||
AM_CPPFLAGS = -W -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DUSE_HYPO_POOL -I$(top_srcdir)/moses/src $(BOOST_CPPFLAGS)
|
||||
|
||||
checkplf_SOURCES = checkplf.cpp
|
||||
checkplf_LDADD = $(top_builddir)/moses/src/libmoses.la
|
||||
checkplf_LDADD = $(top_builddir)/moses/src/libmoses.la $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB) -L$(top_srcdir)/OnDiskPt/src -lOnDiskPt @KENLM_LDFLAGS@
|
||||
|
||||
moses_SOURCES = Main.cpp mbr.cpp IOWrapper.cpp TranslationAnalysis.cpp LatticeMBR.cpp ThreadPool.cpp
|
||||
moses_LDADD = $(top_builddir)/moses/src/libmoses.la $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB) -L$(top_srcdir)/OnDiskPt/src -lOnDiskPt
|
||||
moses_LDADD = $(top_builddir)/moses/src/libmoses.la $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB) -L$(top_srcdir)/OnDiskPt/src -lOnDiskPt @KENLM_LDFLAGS@
|
||||
|
||||
|
||||
lmbrgrid_SOURCES = LatticeMBRGrid.cpp LatticeMBR.cpp IOWrapper.cpp
|
||||
lmbrgrid_LDADD = $(top_builddir)/moses/src/libmoses.la $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB) -L$(top_srcdir)/OnDiskPt/src -lOnDiskPt
|
||||
lmbrgrid_LDADD = $(top_builddir)/moses/src/libmoses.la $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB) -L$(top_srcdir)/OnDiskPt/src -lOnDiskPt @KENLM_LDFLAGS@
|
||||
|
@ -1,5 +1,5 @@
|
||||
bin_PROGRAMS = mosesserver
|
||||
mosesserver_SOURCES = mosesserver.cpp
|
||||
mosesserver_CPPFLAGS = -W -Wall -I$(top_srcdir)/moses/src $(XMLRPC_C_CPPFLAGS) $(BOOST_CPPFLAGS)
|
||||
mosesserver_LDADD = -L$(top_srcdir)/moses/src -lmoses $(BOOST_LDFLAGS) $(XMLRPC_C_LIBS) $(BOOST_THREAD_LIB) -L$(top_srcdir)/OnDiskPt/src -lOnDiskPt
|
||||
mosesserver_DEPENDENCIES = $(top_srcdir)/moses/src/libmoses.la $(top_srcdir)/OnDiskPt/src/libOnDiskPt.a
|
||||
mosesserver_LDADD = -L$(top_srcdir)/moses/src -lmoses $(BOOST_LDFLAGS) $(XMLRPC_C_LIBS) $(BOOST_THREAD_LIB) -L$(top_srcdir)/OnDiskPt/src -lOnDiskPt @KENLM_LDFLAGS@
|
||||
mosesserver_DEPENDENCIES = $(top_srcdir)/moses/src/libmoses.la $(top_srcdir)/OnDiskPt/src/libOnDiskPt.a @KENLM_DEPS@
|
||||
|
Loading…
Reference in New Issue
Block a user