summaryrefslogtreecommitdiff
path: root/acprep
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-11 15:12:29 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-11 16:55:16 -0400
commit4eb46bedf0e6e31797826d05992e007f21ee830b (patch)
tree9a810a9d271cfda647fd52106f5354413232bd71 /acprep
parent53ace5fccad1a91939ff189ce8d1ed134d7a6929 (diff)
downloadfork-ledger-4eb46bedf0e6e31797826d05992e007f21ee830b.tar.gz
fork-ledger-4eb46bedf0e6e31797826d05992e007f21ee830b.tar.bz2
fork-ledger-4eb46bedf0e6e31797826d05992e007f21ee830b.zip
Made acprep conform to /bin/sh, instead of /bin/bash.
Diffstat (limited to 'acprep')
-rwxr-xr-xacprep20
1 files changed, 12 insertions, 8 deletions
diff --git a/acprep b/acprep
index 6d4334cc..a9b7012e 100755
--- a/acprep
+++ b/acprep
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# acprep, version 3.0
#
@@ -31,6 +31,7 @@ if [ -z "$PYTHON_VERSION" ]; then
fi
+BOOST_VERSION="1_38"
BOOST_SUFFIX=""
for lib in $(ls -1 /opt/local/lib/libboost_regex*.a \
/usr/local/lib/libboost_regex*.a 2> /dev/null \
@@ -38,15 +39,13 @@ for lib in $(ls -1 /opt/local/lib/libboost_regex*.a \
do
lib=$(basename "$lib")
suffix=$(echo "$lib" | sed 's/libboost_regex-//' | sed 's/\.a//')
- if [[ "$suffix" != "libboost_regex" ]]; then
+ if [ ! "$suffix" = "libboost_regex" ]; then
echo "Discovered Boost suffix: --boost $suffix"
BOOST_SUFFIX="-$suffix"
fi
break
done
-BOOST_VERSION="1_38"
-
INCDIRS="-isystem /usr/local/include"
INCDIRS="$INCDIRS -isystem /opt/local/include"
@@ -187,7 +186,7 @@ while [ -n "$1" ]; do
shift 1 ;;
--devel)
- if [[ $USE_GLIBCXX_DEBUG == true ]]; then
+ if [ $USE_GLIBCXX_DEBUG = true ]; then
CPPFLAGS="$CPPFLAGS -D_GLIBCXX_DEBUG=1"
CPPFLAGS="-isystem /usr/local/stow/cppunit-debug/include $CPPFLAGS"
LDFLAGS="-L/usr/local/stow/cppunit-debug/lib $LDFLAGS"
@@ -199,11 +198,11 @@ while [ -n "$1" ]; do
# g++ 4.0.1 cannot use PCH headers on OS X 10.5, so we must use a
# newer version.
- if [[ -f /usr/bin/g++-4.2 ]]; then
+ if [ -f /usr/bin/g++-4.2 ]; then
CC=/usr/bin/gcc-4.2
CXX=/usr/bin/g++-4.2
LD=/usr/bin/g++-4.2
- elif [[ -f /opt/local/bin/g++-mp-4.3 ]]; then
+ elif [ -f /opt/local/bin/g++-mp-4.3 ]; then
CC=/opt/local/bin/gcc-mp-4.3
CXX=/opt/local/bin/g++-mp-4.3
LD=/opt/local/bin/g++-mp-4.3
@@ -291,6 +290,11 @@ while [ -n "$1" ]; do
DO_BUILD=true
shift 1 ;;
+ --switch)
+ shift 1
+ SWITCHES="$SWITCHES $1"
+ shift 1 ;;
+
--local)
shift 1 ;;
@@ -324,7 +328,7 @@ PATH="$PYTHON_HOME/bin:$PATH" \
"$HERE/configure" --srcdir="$HERE" \
CXX="$CXX" CPPFLAGS="$CPPFLAGS" CXXFLAGS="$CXXFLAGS" \
LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
- $SWITCHES "$@"
+ $SWITCHES
# Alter the Makefile so that it's not nearly so verbose. This makes errors