summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorjon.h.clark <jon.h.clark@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-11-12 20:22:56 +0000
committerjon.h.clark <jon.h.clark@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-11-12 20:22:56 +0000
commit29c93ee69d4507eee05b7693e5a781643e8339d4 (patch)
treef8159b5bd6a1208c167df70addc67f91b25de3dc /configure.ac
parent64b541ab1490476f662a2bfeb66f237e3e2ed839 (diff)
Gross hack for compiling GLC as a library. Currently has hardcoded path, but shouldn't break the build.
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@716 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 27 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 1a87d323..3fb4ef47 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,6 +50,14 @@ AC_ARG_WITH(randlm,
[with_randlm=no]
)
+AM_CONDITIONAL([GLC], false)
+AC_ARG_WITH(glc,
+ [AC_HELP_STRING([--with-glc=PATH], [(optional) path to Global Lexical Coherence package (Context CRF)])],
+ [with_glc=$withval],
+ [with_glc=no]
+ )
+FF_GLC=""
+
if test "x$with_srilm" != 'xno'
then
SAVE_CPPFLAGS="$CPPFLAGS"
@@ -87,4 +95,23 @@ then
AM_CONDITIONAL([RAND_LM], true)
fi
+
+if test "x$with_glc" != 'xno'
+then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -I${with_glc} -I${with_glc}/cdec"
+
+ #AC_CHECK_HEADER(ff_glc.h,
+ # [AC_DEFINE([HAVE_GLC], [], [flag for GLC])],
+ # [AC_MSG_ERROR([Cannot find GLC!])])
+
+ AC_DEFINE([HAVE_GLC], [], [flag for GLC])
+ #LIB_RANDLM="-lrandlm"
+ #LDFLAGS="$LDFLAGS -L${with_glc}/lib"
+ #LIBS="$LIBS $LIB_RANDLM"
+ #FMTLIBS="$FMTLIBS libglc.a"
+ AC_SUBST(FF_GLC,"${with_glc}/cdec/ff_glc.cc")
+ AM_CONDITIONAL([GLC], true)
+fi
+
AC_OUTPUT(Makefile utils/Makefile mteval/Makefile extools/Makefile decoder/Makefile training/Makefile vest/Makefile klm/util/Makefile klm/lm/Makefile gi/pyp-topics/src/Makefile gi/clda/src/Makefile)