From b4304515ff0501da47cbcd4b47c770e2bb55a83d Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 28 Aug 2004 04:26:48 -0400 Subject: ledger.so (the python module) now builds based on autoconf discovery --- configure.in | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 3faa10fe..6fd1cbab 100644 --- a/configure.in +++ b/configure.in @@ -26,6 +26,28 @@ AC_CHECK_LIB([xmlparse], [XML_ParserCreate], AM_CONDITIONAL(READ_GNUCASH, false)], [-lxmltok]) +AM_PATH_PYTHON(2.2,, :) +AM_CONDITIONAL(HAVE_PYTHON, [test "$PYTHON" != :]) +AC_CACHE_CHECK( + [if boost_python is available], + [boost_python_cpplib_avail], + [boost_python_save_libs=$LIBS + LIBS="-lboost_python $LIBS" + AC_LANG_PUSH(C++) + AC_TRY_COMPILE( + [#include + using namespace boost::python; + class foo {}; + BOOST_PYTHON_MODULE(samp) { + class_< foo > ("foo") ; + }], + [return 0], + [boost_python_cpplib_avail=true], + [boost_python_cpplib_avail=false]) + AC_LANG_POP + LIBS=$boost_python_save_libs]) +AM_CONDITIONAL(HAVE_BOOST_PYTHON, test x$boost_python_cpplib_avail = xtrue) + # Check for options AC_ARG_ENABLE(debug, [ --enable-debug Turn on debugging], -- cgit v1.2.3