summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2011-10-19 14:02:34 +0200
committerPatrick Simianer <p@simianer.de>2011-10-19 14:02:34 +0200
commiteb14e36d0b29f19321d44dd7dfa73cc703838d86 (patch)
tree1285e9e56959bc3a4b506e36bbc3b49f4e938fa0 /configure.ac
parent68f158b11df9f4072699fe6a4c8022ea54102b28 (diff)
parent04e38a57b19ea012895ac2efb39382c2e77833a9 (diff)
merge upstream/master
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac53
1 files changed, 37 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac
index 1e984fcc..ec519067 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,41 @@ AC_PROG_CXX
AC_LANG_CPLUSPLUS
BOOST_REQUIRE
BOOST_PROGRAM_OPTIONS
+AC_ARG_ENABLE(mpi,
+ [ --enable-mpi Build MPI binaries, assumes mpi.h is present ],
+ [ mpi=yes
+ ])
+AM_CONDITIONAL([MPI], [test "x$mpi" = xyes])
+
+if test "x$mpi" = xyes
+then
+ BOOST_SERIALIZATION
+ AC_DEFINE([HAVE_MPI], [1], [flag for MPI])
+ # TODO BOOST_MPI needs to be implemented
+ LIBS="$LIBS -lboost_mpi $BOOST_SERIALIZATION_LIBS"
+fi
+
+AM_CONDITIONAL([HAVE_CMPH], false)
+AC_ARG_WITH(cmph,
+ [AC_HELP_STRING([--with-cmph=PATH], [(optional) path to cmph perfect hashing library])],
+ [with_cmph=$withval],
+ [with_cmph=no]
+ )
+
+if test "x$with_cmph" != 'xno'
+then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -I${with_cmph}/include"
+
+ AC_CHECK_HEADER(cmph.h,
+ [AC_DEFINE([HAVE_CMPH], [], [flag for cmph perfect hashing library])],
+ [AC_MSG_ERROR([Cannot find cmph library!])])
+
+ LDFLAGS="$LDFLAGS -L${with_cmph}/lib"
+ AC_CHECK_LIB(cmph, cmph_search)
+ AM_CONDITIONAL([HAVE_CMPH], true)
+fi
+
#BOOST_THREADS
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
LDFLAGS="$LDFLAGS $BOOST_PROGRAM_OPTIONS_LDFLAGS"
@@ -25,21 +60,7 @@ AC_CHECK_HEADER(google/dense_hash_map,
[AC_DEFINE([HAVE_SPARSEHASH], [], [flag for google::dense_hash_map])])
AC_PROG_INSTALL
-GTEST_LIB_CHECK
-
-AC_ARG_ENABLE(mpi,
- [ --enable-mpi Build MPI binaries, assumes mpi.h is present ],
- [ mpi=yes
- ])
-AM_CONDITIONAL([MPI], [test "x$mpi" = xyes])
-
-if test "x$mpi" = xyes
-then
- BOOST_SERIALIZATION
- AC_DEFINE([HAVE_MPI], [1], [flag for MPI])
- # TODO BOOST_MPI needs to be implemented
- LIBS="$LIBS -lboost_mpi $BOOST_SERIALIZATION_LIBS -lmpi++ -lmpi"
-fi
+GTEST_LIB_CHECK(1.0)
AM_CONDITIONAL([RAND_LM], false)
AC_ARG_WITH(randlm,
@@ -92,4 +113,4 @@ then
AM_CONDITIONAL([GLC], true)
fi
-AC_OUTPUT(Makefile utils/Makefile mteval/Makefile extools/Makefile decoder/Makefile phrasinator/Makefile training/Makefile vest/Makefile klm/util/Makefile klm/lm/Makefile mira/Makefile dtrain/Makefile gi/pyp-topics/src/Makefile gi/clda/src/Makefile)
+AC_OUTPUT(Makefile utils/Makefile mteval/Makefile extools/Makefile decoder/Makefile phrasinator/Makefile training/Makefile vest/Makefile pro-train/Makefile klm/util/Makefile klm/lm/Makefile mira/Makefile dtrain/Makefile gi/pyp-topics/src/Makefile gi/clda/src/Makefile gi/pf/Makefile gi/markov_al/Makefile)