Removed unnecessary #ifdef block. pyinterp.h now guards itself.

This commit is contained in:
John Wiegley 2009-01-31 16:03:53 -04:00
parent d2df584373
commit b027961b96
4 changed files with 18 additions and 23 deletions

View file

@ -13,12 +13,6 @@ lib_LTLIBRARIES = \
lib_cppflags = -I$(srcdir)/src -I$(srcdir)/lib \
-I$(srcdir)/lib/utfcpp/source \
-I$(srcdir)/lib/irrxml/src
if HAVE_LIBOFX
lib_cppflags += -DHAVE_LIBOFX=1
endif
if DEBUG
lib_cppflags += -DDEBUG_MODE
endif
libledger_util_la_SOURCES = \
src/utils.cc \
@ -198,7 +192,7 @@ bin_PROGRAMS = ledger
ledger_CPPFLAGS = $(lib_cppflags)
if HAVE_BOOST_PYTHON
ledger_CPPFLAGS += -DHAVE_BOOST_PYTHON=1 -I$(srcdir)/python
ledger_CPPFLAGS += -I$(srcdir)/python
endif
ledger_SOURCES = src/main.cc
ledger_LDADD = $(LIBOBJS) $(lib_LTLIBRARIES)

View file

@ -31,6 +31,9 @@ AC_ARG_ENABLE(debug,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
esac],[debug=false])
if [ test x$debug = xtrue ]; then
AC_DEFINE([DEBUG_MODE], [1], [Whether debugging is enabled])
fi
AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
AC_ARG_ENABLE(pch,
@ -41,6 +44,9 @@ AC_ARG_ENABLE(pch,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-pch) ;;
esac],[pch=false])
if [ test x$pch = xtrue ]; then
AC_DEFINE([USE_PCH], [1], [Whether pre-compiled headers are being used])
fi
AM_CONDITIONAL(USE_PCH, test x$pch = xtrue)
AC_ARG_WITH(boost-suffix,
@ -228,12 +234,11 @@ AC_CACHE_CHECK(
AC_LANG_POP
LIBS=$libofx_save_libs])
if [test x$libofx_avail_cv_ = xtrue ]; then
AM_CONDITIONAL(HAVE_LIBOFX, true)
if [ test x$libofx_avail_cv_ = xtrue ]; then
AC_DEFINE([HAVE_LIBOFX], [1], [Whether libofx is available])
LIBS="-lofx $LIBS"
else
AM_CONDITIONAL(HAVE_LIBOFX, false)
fi
AM_CONDITIONAL(HAVE_LIBOFX, test x$libofx_avail_cv_ = xtrue)
# check for Python
AM_PATH_PYTHON(2.4,, :)
@ -259,16 +264,14 @@ if [test "$PYTHON" != :]; then
AC_LANG_POP
LIBS=$boost_python_save_libs])
if [test x$boost_python_cpplib_avail_cv_ = xtrue ]; then
AM_CONDITIONAL(HAVE_BOOST_PYTHON, true)
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"
else
AM_CONDITIONAL(HAVE_BOOST_PYTHON, false)
fi
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(
@ -294,11 +297,7 @@ AC_CACHE_CHECK(
AC_LANG_POP
LIBS=$cppunit_save_libs])
if [test x$cppunit_avail_cv_ = xtrue ]; then
AM_CONDITIONAL(HAVE_CPPUNIT, true)
else
AM_CONDITIONAL(HAVE_CPPUNIT, false)
fi
AM_CONDITIONAL(HAVE_CPPUNIT, test x$cppunit_avail_cv_ = xtrue)
# Checks for header files.
AC_HEADER_STDC

View file

@ -35,6 +35,8 @@
#include "scope.h"
#include "session.h"
#if defined(HAVE_BOOST_PYTHON)
#include <boost/python.hpp>
#include <Python.h>
@ -126,4 +128,6 @@ public:
} // namespace ledger
#endif // HAVE_BOOST_PYTHON
#endif // _PYINTERP_H

View file

@ -33,9 +33,7 @@
#include "report.h"
#include "option.h"
#include "help.h"
#if defined(HAVE_BOOST_PYTHON)
#include "pyinterp.h"
#endif
#include "textual.h"
#include "qif.h"