diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/configure.in b/configure.in index f2f59bbff19..c3c792e7339 100644 --- a/configure.in +++ b/configure.in @@ -351,11 +351,21 @@ then if echo $CXX | grep gcc > /dev/null 2>&1 then - if $CXX -v 2>&1 | grep 'version 3' > /dev/null 2>&1 - then - # Statically link the language support function's found in libsupc++.a - LIBS="$LIBS -lsupc++" - fi + GCC_VERSION=`gcc -v 2>&1 | grep version | sed -e 's/[[^0-9. ]]//g; s/^ *//g; s/ .*//g'` + echo "Using gcc version '$GCC_VERSION'" + case "$GCC_VERSION" in + 3.4.*|3.5.*) + # Statically link the language support function's found in libsupc++.a + LIBS="$LIBS -lsupc++" + echo "Using -libsupc++ for static linking with gcc" + ;; + *) + # Using -lsupc++ doesn't work in gcc 3.3 on SuSE 9.2 + # (causes link failures when linking things staticly) + CXXFLAGS="$CXXFLAGS -DUSE_MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL" + echo "Using MYSYS_NEW for static linking with gcc" + ;; + esac fi fi |