[Libreoffice-commits] core.git: configure.ac

Stephan Bergmann sbergman at redhat.com
Fri Aug 9 00:51:04 PDT 2013


 configure.ac |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4f19b6f5128e96ff05a0601834296da8f75874e2
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Aug 9 09:49:05 2013 +0200

    "gcc --version" output is rather unreliable
    
    ...so extend 409e6a2e0b89eab82e79b0cd122062f47c6c7afb "gcc -dumpversion has only
    MAJOR.MINOR, not MAJOR.MINOR.PATCHLEVEL" to also cope with e.g. Fedora 18 gcc's
    "gcc (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8)" output line.
    
    Change-Id: Ieb5e032685da49cd7e6f0a49a0fdc137fc24fbbd

diff --git a/configure.ac b/configure.ac
index 546fab9..7f9b408 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2929,7 +2929,7 @@ dnl  Test the gcc version
 dnl ===================================================================
 if test "$GCC" = "yes"; then
     AC_MSG_CHECKING([the GCC version])
-    _gcc_version=`$CC --version|head -n1|sed 's/^.* //g'`
+    _gcc_version=`$CC --version|head -n1|sed -e 's/^.* //g' -e 's/-[[0-9]]*)$//'`
     _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
     GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
 


More information about the Libreoffice-commits mailing list