summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2012-03-13 09:24:47 +0100
committerPatrick Simianer <p@simianer.de>2012-03-13 09:24:47 +0100
commitef6085e558e26c8819f1735425761103021b6470 (patch)
tree5cf70e4c48c64d838e1326b5a505c8c4061bff4a /configure.ac
parent10a232656a0c882b3b955d2bcfac138ce11e8a2e (diff)
parentdfbc278c1057555fda9312291c8024049e00b7d8 (diff)
merge with upstream
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac30
1 files changed, 23 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index ec519067..dee28083 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ esac
AC_PROG_CC
AC_PROG_CXX
AC_LANG_CPLUSPLUS
-BOOST_REQUIRE
+BOOST_REQUIRE([1.44])
BOOST_PROGRAM_OPTIONS
AC_ARG_ENABLE(mpi,
[ --enable-mpi Build MPI binaries, assumes mpi.h is present ],
@@ -38,7 +38,7 @@ then
CPPFLAGS="$CPPFLAGS -I${with_cmph}/include"
AC_CHECK_HEADER(cmph.h,
- [AC_DEFINE([HAVE_CMPH], [], [flag for cmph perfect hashing library])],
+ [AC_DEFINE([HAVE_CMPH], [1], [flag for cmph perfect hashing library])],
[AC_MSG_ERROR([Cannot find cmph library!])])
LDFLAGS="$LDFLAGS -L${with_cmph}/lib"
@@ -46,6 +46,25 @@ then
AM_CONDITIONAL([HAVE_CMPH], true)
fi
+AM_CONDITIONAL([HAVE_EIGEN], false)
+AC_ARG_WITH(eigen,
+ [AC_HELP_STRING([--with-eigen=PATH], [(optional) path to Eigen linear algebra library])],
+ [with_eigen=$withval],
+ [with_eigen=no]
+ )
+
+if test "x$with_eigen" != 'xno'
+then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -I${with_eigen}"
+
+ AC_CHECK_HEADER(Eigen/Dense,
+ [AC_DEFINE([HAVE_EIGEN], [1], [flag for Eigen linear algebra library])],
+ [AC_MSG_ERROR([Cannot find Eigen!])])
+
+ AM_CONDITIONAL([HAVE_EIGEN], true)
+fi
+
#BOOST_THREADS
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
LDFLAGS="$LDFLAGS $BOOST_PROGRAM_OPTIONS_LDFLAGS"
@@ -53,11 +72,8 @@ LDFLAGS="$LDFLAGS $BOOST_PROGRAM_OPTIONS_LDFLAGS"
LIBS="$LIBS $BOOST_PROGRAM_OPTIONS_LIBS"
# $BOOST_THREAD_LIBS"
-AC_CHECK_HEADER(boost/math/special_functions/digamma.hpp,
- [AC_DEFINE([HAVE_BOOST_DIGAMMA], [], [flag for boost::math::digamma])])
-
AC_CHECK_HEADER(google/dense_hash_map,
- [AC_DEFINE([HAVE_SPARSEHASH], [], [flag for google::dense_hash_map])])
+ [AC_DEFINE([HAVE_SPARSEHASH], [1], [flag for google::dense_hash_map])])
AC_PROG_INSTALL
GTEST_LIB_CHECK(1.0)
@@ -113,4 +129,4 @@ then
AM_CONDITIONAL([GLC], true)
fi
-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)
+AC_OUTPUT(Makefile utils/Makefile mteval/Makefile extools/Makefile decoder/Makefile phrasinator/Makefile training/Makefile dpmert/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)