diff options
author | John Wiegley <johnw@newartisans.com> | 2004-09-20 04:07:02 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-09-20 04:07:02 -0400 |
commit | a7ea33a8ecc9886dd7a94906ae30c861b4da3540 (patch) | |
tree | 6c2c4df6620f25de5505694c1c8b6d9424b13381 /configure.in | |
parent | 5429792edc077d8c65d7bbf0f98c3d0e59837775 (diff) | |
download | fork-ledger-a7ea33a8ecc9886dd7a94906ae30c861b4da3540.tar.gz fork-ledger-a7ea33a8ecc9886dd7a94906ae30c861b4da3540.tar.bz2 fork-ledger-a7ea33a8ecc9886dd7a94906ae30c861b4da3540.zip |
passing --enable-python to configure is now required for python support
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 62 |
1 files changed, 40 insertions, 22 deletions
diff --git a/configure.in b/configure.in index d295b3f8..7788528a 100644 --- a/configure.in +++ b/configure.in @@ -12,6 +12,7 @@ AC_PROG_CXX AC_PROG_MAKE_SET AC_PROG_LIBTOOL AM_PROG_LIBTOOL +#AC_PROG_RANLIB # Checks for libraries. AC_CHECK_LIB([gmp], [__gmpz_add], [], @@ -26,31 +27,48 @@ 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 <boost/python.hpp> - 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) +AC_ARG_ENABLE(python, + [ --enable-python Turn on Python support], + [case "${enableval}" in + yes) python=true ;; + no) python=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-python) ;; + esac],[python=false]) +AM_CONDITIONAL(USE_PYTHON, test x$python = xtrue) + +if [test x$python = xtrue ]; then + AM_PATH_PYTHON(2.2,, :) + if [test "$PYTHON" != :]; then + 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 <boost/python.hpp> + 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) + else + AM_CONDITIONAL(HAVE_BOOST_PYTHON, false) + fi +else + AM_CONDITIONAL(HAVE_BOOST_PYTHON, false) +fi # Check for options AC_ARG_ENABLE(debug, - [ --enable-debug Turn on debugging], + [ --enable-debug Turn on debugging], [case "${enableval}" in yes) debug=true ;; no) debug=false ;; |