summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am8
-rwxr-xr-xsetup.py8
2 files changed, 15 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index b3f7c17a..019fe80b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -78,12 +78,20 @@ if HAVE_BOOST_PYTHON
noinst_PROGRAMS = ledger.so
+if READ_GNUCASH
+READ_GNUCASH_VALUE = true
+else
+READ_GNUCASH_VALUE = false
+endif
+
ledger.so: python.cc libledger.la
CFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS) -L. -L.libs" \
+ READ_GNUCASH="$(READ_GNUCASH_VALUE)" \
python setup.py build --build-lib=.
install-exec-hook:
CFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS) -L. -L.libs" \
+ READ_GNUCASH="$(READ_GNUCASH_VALUE)" \
python setup.py install --prefix=$(prefix)
endif
diff --git a/setup.py b/setup.py
index e18031b1..874c8cca 100755
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,13 @@
from distutils.core import setup, Extension
-libs = ["ledger", "boost_python", "gmp", "pcre", "xmlparse", "xmltok"]
+import os
+
+libs = ["ledger", "boost_python", "gmp", "pcre"]
+
+if os.environ.has_key ("READ_GNUCASH") and\
+ os.environ["READ_GNUCASH"] == "true":
+ libs.extend (["xmlparse", "xmltok"])
setup(name = "Ledger",
version = "2.0b",