summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2012-08-10 23:58:41 -0400
committerChris Dyer <cdyer@cs.cmu.edu>2012-08-10 23:58:41 -0400
commit88a2df4292f26c4a17de4a856b0579c4ce0de7dd (patch)
tree9c70700562fd31ec2c7e8182ffbd5bc9982310b7 /configure.ac
parent3e5590e041563095833753f3fed24373a7461d3e (diff)
autogenerate setup.py
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac54
1 files changed, 28 insertions, 26 deletions
diff --git a/configure.ac b/configure.ac
index eb2f4aaa..10cd8fd9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,6 +13,9 @@ AC_LANG_CPLUSPLUS
BOOST_REQUIRE([1.44])
BOOST_PROGRAM_OPTIONS
BOOST_TEST
+AM_PATH_PYTHON
+# TODO detect Cython, generate python/Makefile that calls "python setup.py build"
+
AC_ARG_ENABLE(mpi,
[ --enable-mpi Build MPI binaries, assumes mpi.h is present ],
[ mpi=yes
@@ -79,13 +82,6 @@ AC_CHECK_HEADER(google/dense_hash_map,
AC_PROG_INSTALL
-AM_CONDITIONAL([RAND_LM], false)
-AC_ARG_WITH(randlm,
- [AC_HELP_STRING([--with-randlm=PATH], [(optional) path to RandLM toolkit])],
- [with_randlm=$withval],
- [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)])],
@@ -94,24 +90,6 @@ AC_ARG_WITH(glc,
)
FF_GLC=""
-if test "x$with_randlm" != 'xno'
-then
- SAVE_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -I${with_randlm}/include"
-
- AC_CHECK_HEADER(RandLM.h,
- [AC_DEFINE([HAVE_RANDLM], [], [flag for RandLM])],
- [AC_MSG_ERROR([Cannot find RandLM!])])
-
-
- LIB_RANDLM="-lrandlm"
- LDFLAGS="$LDFLAGS -L${with_randlm}/lib"
- LIBS="$LIBS $LIB_RANDLM"
- FMTLIBS="$FMTLIBS librandlm.a"
- AM_CONDITIONAL([RAND_LM], true)
-fi
-
-
if test "x$with_glc" != 'xno'
then
SAVE_CPPFLAGS="$CPPFLAGS"
@@ -132,4 +110,28 @@ fi
CPPFLAGS="-DPIC -fPIC $CPPFLAGS -DHAVE_CONFIG_H"
-AC_OUTPUT(Makefile rst_parser/Makefile utils/Makefile mteval/Makefile extools/Makefile decoder/Makefile phrasinator/Makefile training/Makefile training/liblbfgs/Makefile dpmert/Makefile pro-train/Makefile rampion/Makefile minrisk/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_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([utils/Makefile])
+AC_CONFIG_FILES([mteval/Makefile])
+AC_CONFIG_FILES([extools/Makefile])
+AC_CONFIG_FILES([decoder/Makefile])
+AC_CONFIG_FILES([phrasinator/Makefile])
+AC_CONFIG_FILES([training/Makefile])
+AC_CONFIG_FILES([training/liblbfgs/Makefile])
+AC_CONFIG_FILES([dpmert/Makefile])
+AC_CONFIG_FILES([pro-train/Makefile])
+AC_CONFIG_FILES([rampion/Makefile])
+AC_CONFIG_FILES([minrisk/Makefile])
+AC_CONFIG_FILES([klm/util/Makefile])
+AC_CONFIG_FILES([klm/lm/Makefile])
+AC_CONFIG_FILES([mira/Makefile])
+AC_CONFIG_FILES([dtrain/Makefile])
+AC_CONFIG_FILES([gi/pyp-topics/src/Makefile])
+AC_CONFIG_FILES([gi/clda/src/Makefile])
+AC_CONFIG_FILES([gi/pf/Makefile])
+AC_CONFIG_FILES([gi/markov_al/Makefile])
+
+AC_CONFIG_FILES([python/setup.py],[chmod +x python/setup.py])
+
+AC_OUTPUT
+