diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-13 01:48:02 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-13 01:48:02 -0500 |
commit | 55317174ddf4d3f832d909e76d347a22191c0702 (patch) | |
tree | e42291ecd06027fe0816ebc77241e34dccd0eba1 | |
parent | e35394a70defbffc7464713aaa700693e97ef358 (diff) | |
download | fork-ledger-55317174ddf4d3f832d909e76d347a22191c0702.tar.gz fork-ledger-55317174ddf4d3f832d909e76d347a22191c0702.tar.bz2 fork-ledger-55317174ddf4d3f832d909e76d347a22191c0702.zip |
Python support is now off by default
-rwxr-xr-x | acprep | 22 | ||||
-rw-r--r-- | tools/configure.ac | 67 |
2 files changed, 54 insertions, 35 deletions
@@ -751,22 +751,26 @@ class PrepareBuild(CommandLineApp): def setup_for_johnw(self): # jww (2009-03-09): Some peculiarities specific to my system if exists('/Users/johnw/Dropbox/Accounts/ledger.dat'): - if exists('/usr/local/stow/cppunit/include'): - self.sys_include_dirs.insert(0, '/usr/local/stow/cppunit/include') - self.sys_library_dirs.insert(0, '/usr/local/stow/cppunit/lib') + if self.current_flavor == 'debug': + if exists('/usr/local/stow/cppunit/include'): + self.sys_include_dirs.insert(0, '/usr/local/stow/cppunit/include') + self.sys_library_dirs.insert(0, '/usr/local/stow/cppunit/lib') - if exists('/usr/local/stow/icu/include'): - self.sys_include_dirs.insert(0, '/usr/local/stow/icu/include') - self.sys_library_dirs.insert(0, '/usr/local/stow/icu/lib') + if exists('/usr/local/stow/icu/include'): + self.sys_include_dirs.insert(0, '/usr/local/stow/icu/include') + self.sys_library_dirs.insert(0, '/usr/local/stow/icu/lib') + + self.CPPFLAGS.append('-D_GLIBCXX_FULLY_DYNAMIC_STRING=1') + + self.options.use_glibcxx_debug = True self.CXXFLAGS.append('-march=nocona') self.CXXFLAGS.append('-msse3') - self.CPPFLAGS.append('-D_GLIBCXX_FULLY_DYNAMIC_STRING=1') self.configure_args.append('--disable-shared') self.configure_args.append('--enable-doxygen') + self.configure_args.append('--enable-python') - self.options.use_glibcxx_debug = True self.locate_my_libraries() def setup_for_system(self): @@ -1049,7 +1053,9 @@ class PrepareBuild(CommandLineApp): def setup_flavor_opt(self): self.CXXFLAGS.append('-O3') + self.LDFLAGS.append('-O3') self.CXXFLAGS.append('-fomit-frame-pointer') + self.LDFLAGS.append('-fomit-frame-pointer') def setup_flavor_gcov(self): self.CXXFLAGS.append('-g') diff --git a/tools/configure.ac b/tools/configure.ac index 747d940d..f576bd61 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -62,6 +62,14 @@ AC_ARG_ENABLE(doxygen, AM_CONDITIONAL(USE_DOXYGEN, test x$doxygen = xtrue) +AC_ARG_ENABLE(python, + [ --enable-python Turn on Python support (experimental)], + [case "${enableval}" in + yes) python=true ;; + no) python=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-python) ;; + esac],[python=false]) + AC_ARG_WITH(boost-suffix, [ --with-boost-suffix=X Append X to the Boost library names], [BOOST_SUFFIX="${withval}"], @@ -336,37 +344,42 @@ fi AM_CONDITIONAL(HAVE_BOOST_SERIALIZATION, test x$boost_serialization_cpplib_avail_cv_ = xtrue) # check for Python -AM_PATH_PYTHON(2.4,, :) -if [test "$PYTHON" != :]; then - AM_CONDITIONAL(HAVE_PYTHON, true) - AC_CACHE_CHECK( - [if boost_python is available], - [boost_python_cpplib_avail_cv_], - [boost_python_save_libs=$LIBS - LIBS="-lboost_python$BOOST_SUFFIX -lpython$PYTHON_VERSION $LIBS" - AC_LANG_PUSH(C++) - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include <boost/python.hpp> - using namespace boost::python; - class foo {}; - BOOST_PYTHON_MODULE(samp) { - class_< foo > ("foo") ; - }]], - [[return 0]])], - [boost_python_cpplib_avail_cv_=true], - [boost_python_cpplib_avail_cv_=false]) - AC_LANG_POP - LIBS=$boost_python_save_libs]) - - if [ test x$boost_python_cpplib_avail_cv_ = xtrue ]; then - AC_DEFINE([HAVE_BOOST_PYTHON], [1], [Whether Boost.Python is available]) - LIBS="-lboost_python$BOOST_SUFFIX -lpython$PYTHON_VERSION $LIBS" +if [ test x$python = xtrue ]; then + AM_PATH_PYTHON(2.4,, :) + if [test "$PYTHON" != :]; then + AM_CONDITIONAL(HAVE_PYTHON, true) + AC_CACHE_CHECK( + [if boost_python is available], + [boost_python_cpplib_avail_cv_], + [boost_python_save_libs=$LIBS + LIBS="-lboost_python$BOOST_SUFFIX -lpython$PYTHON_VERSION $LIBS" + AC_LANG_PUSH(C++) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include <boost/python.hpp> + using namespace boost::python; + class foo {}; + BOOST_PYTHON_MODULE(samp) { + class_< foo > ("foo") ; + }]], + [[return 0]])], + [boost_python_cpplib_avail_cv_=true], + [boost_python_cpplib_avail_cv_=false]) + AC_LANG_POP + LIBS=$boost_python_save_libs]) + + if [ test x$boost_python_cpplib_avail_cv_ = xtrue ]; then + AC_DEFINE([HAVE_BOOST_PYTHON], [1], [Whether Boost.Python is available]) + LIBS="-lboost_python$BOOST_SUFFIX -lpython$PYTHON_VERSION $LIBS" + fi + else + AM_CONDITIONAL(HAVE_PYTHON, false) fi + AM_CONDITIONAL(HAVE_BOOST_PYTHON, test x$boost_python_cpplib_avail_cv_ = xtrue) else AM_CONDITIONAL(HAVE_PYTHON, false) + AM_CONDITIONAL(HAVE_BOOST_PYTHON, false) fi -AM_CONDITIONAL(HAVE_BOOST_PYTHON, test x$boost_python_cpplib_avail_cv_ = xtrue) # check for CppUnit AC_CACHE_CHECK( |