diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-08 21:14:09 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-08 21:14:09 -0400 |
commit | 7eb4a7eece8b516f7a34b90dfdffc630947dca96 (patch) | |
tree | 8e153c1a5cff984af4d8e91113539a0115879cb5 | |
parent | 63f9d97ddaf26283b5f8a154abae937dca05d290 (diff) | |
download | fork-ledger-7eb4a7eece8b516f7a34b90dfdffc630947dca96.tar.gz fork-ledger-7eb4a7eece8b516f7a34b90dfdffc630947dca96.tar.bz2 fork-ledger-7eb4a7eece8b516f7a34b90dfdffc630947dca96.zip |
Conditionalize the ability to use pre-compiled headers.
-rwxr-xr-x | acprep | 58 |
1 files changed, 31 insertions, 27 deletions
@@ -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 |