summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xacprep58
1 files changed, 31 insertions, 27 deletions
diff --git a/acprep b/acprep
index 695dc5c2..11731d4a 100755
--- a/acprep
+++ b/acprep
@@ -179,21 +179,37 @@ DO_BUILD=false
while [ -n "$1" ]; do
case "$1" in
--devel)
- # jww (2008-08-07): Sadly, PCH does not work with Boost+gcc4.0 on
- # OS X. It does work with gcc4.2, but then _GLIBCXX_DEBUG fails.
- SWITCHES="$SWITCHES --enable-pch"
-
- # The use of this flag requires that Boost be also built with
- # _GLIBCXX_DEBUG.
- #CPPFLAGS="$CPPFLAGS -D_GLIBCXX_DEBUG=1"
- #CPPFLAGS="-isystem /usr/local/stow/cppunit-debug/include $CPPFLAGS"
- #LDFLAGS="-L/usr/local/stow/cppunit-debug/lib $LDFLAGS"
- CPPFLAGS="-isystem /usr/local/stow/cppunit/include $CPPFLAGS"
- LDFLAGS="-L/usr/local/stow/cppunit/lib $LDFLAGS"
-
- # I build my debug Boost libs with _GLIBCXX_DEBUG
- #BOOST_SUFFIX="-xgcc40-d-$BOOST_VERSION"
- BOOST_SUFFIX="-xgcc40"
+ USE_GLIBCXX_DEBUG=true
+
+ 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"
+
+ # I build my debug Boost libs with _GLIBCXX_DEBUG
+ BOOST_SUFFIX="-xgcc40-d-$BOOST_VERSION"
+ else
+ SWITCHES="$SWITCHES --enable-pch"
+
+ # 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
+ 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
+ CC=/opt/local/bin/gcc-mp-4.3
+ CXX=/opt/local/bin/g++-mp-4.3
+ LD=/opt/local/bin/g++-mp-4.3
+ elif [ $SYSTEM = Darwin ]; then
+ CXXFLAGS="$CXXFLAGS -Wno-shorten-64-to-32"
+ fi
+
+ CPPFLAGS="-isystem /usr/local/stow/cppunit/include $CPPFLAGS"
+ LDFLAGS="-L/usr/local/stow/cppunit/lib $LDFLAGS"
+
+ BOOST_SUFFIX="-xgcc40"
+ fi
# Do the same thing as --debug below
SWITCHES="$SWITCHES --enable-debug"
@@ -222,18 +238,6 @@ while [ -n "$1" ]; do
CXXFLAGS="$CXXFLAGS -Wno-old-style-cast"
CXXFLAGS="$CXXFLAGS -Wno-deprecated"
- 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
- CC=/opt/local/bin/gcc-mp-4.3
- CXX=/opt/local/bin/g++-mp-4.3
- LD=/opt/local/bin/g++-mp-4.3
- elif [ $SYSTEM = Darwin ]; then
- CXXFLAGS="$CXXFLAGS -Wno-shorten-64-to-32"
- fi
-
#LDFLAGS="-Wl,-read_only_relocs,suppress"
#LIBS=""
#if [ -f /opt/local/lib/libgmp.a ]; then