Apparently gcc -dumpversion has worked at least since 2.7.2, use this for
authorRalph Giles <giles@xiph.org>
Mon, 1 Aug 2005 18:41:28 +0000 (18:41 +0000)
committerRalph Giles <giles@xiph.org>
Mon, 1 Aug 2005 18:41:28 +0000 (18:41 +0000)
version detection instead since it's cleaner and probably more reliable.

svn path=/trunk/vorbis/; revision=9686

configure.in

index 0258cf2..8855029 100644 (file)
@@ -99,6 +99,9 @@ if test -z "$GCC"; then
         esac
 else
 
+       AC_MSG_CHECKING([GCC version])
+       GCC_VERSION=`$CC -dumpversion`
+       AC_MSG_RESULT([$GCC_VERSION])
        case $host in 
        *86-*-linux*)
                DEBUG="-g -Wall -W -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
@@ -166,6 +169,14 @@ else
                CFLAGS="-O20 -D__NO_MATH_INLINES -fsigned-char"
                PROFILE="-O20 -g -pg -D__NO_MATH_INLINES -fsigned-char" ;;
         esac
+
+       case "$GCC_VERSION" in
+       4.*)
+               # work around a problem with the gcc4 optimizer
+               PROFILE="$DEBUG -fno-inline-functions"
+               CFLAGS="$CFLAGS -fno-inline-functions"
+               PROFILE="$PROFILE -fno-inline-functions" ;;
+       esac
 fi
 CFLAGS="$CFLAGS $cflags_save"
 LDFLAGS="$LDFLAGS $ldflags_save"