summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-08-08 03:03:11 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-08-08 03:03:11 -0400
commit3be1534915ddd7c1b891134bb495b46eeb1792e0 (patch)
treeb946bdbea301bbfb1d9e282ee1ada9ba1a206049
parent2a12dec5ae084980b8b2f52803f14cc41e049dd8 (diff)
downloadfork-ledger-3be1534915ddd7c1b891134bb495b46eeb1792e0.tar.gz
fork-ledger-3be1534915ddd7c1b891134bb495b46eeb1792e0.tar.bz2
fork-ledger-3be1534915ddd7c1b891134bb495b46eeb1792e0.zip
Don't overwrite PYTHON_HOME or PYTHON_VERSION if defined in the environment.
-rwxr-xr-xacprep12
1 files changed, 9 insertions, 3 deletions
diff --git a/acprep b/acprep
index fa3142df..f60d46f6 100755
--- a/acprep
+++ b/acprep
@@ -25,18 +25,24 @@ autoreconf --force --install
SWITCHES="--enable-python" # always build with Python support
-PYTHON_HOME="/usr"
+if [ -z "$PYTHON_HOME" ]; then
+ PYTHON_HOME="/usr"
+fi
+if [ -z "$PYTHON_VERSION" ]; then
+ PYTHON_VERSION="2.5"
+fi
+
BOOST_SUFFIX=""
INCDIRS="-isystem /usr/local/include"
INCDIRS="$INCDIRS -isystem /opt/local/include"
INCDIRS="$INCDIRS -isystem /opt/local/include/libofx"
INCDIRS="$INCDIRS -isystem /usr/local/include/boost-1_35"
-INCDIRS="$INCDIRS -isystem $PYTHON_HOME/include/python2.5"
+INCDIRS="$INCDIRS -isystem $PYTHON_HOME/include/python$PYTHON_VERSION"
LDFLAGS=""
LIBDIRS="-L/usr/local/lib -L/opt/local/lib"
-LIBDIRS="$LIBDIRS -L$PYTHON_HOME/lib/python2.5/config"
+LIBDIRS="$LIBDIRS -L$PYTHON_HOME/lib/python$PYTHON_VERSION/config"
ARCHFLAGS="-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.5.sdk"