summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-08-09 10:28:51 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2013-08-09 10:29:08 +0200
commit91ec774c9fff46af6800e75315561e86167fe5d1 (patch)
treea26a74c260588e8855c91e23dc8ad62287261bef /configure.ac
parentCall AddDocumentToPickList in SFX_EVENT_OPENDOC (diff)
downloadcore-91ec774c9fff46af6800e75315561e86167fe5d1.tar.gz
core-91ec774c9fff46af6800e75315561e86167fe5d1.zip
$CC --version is too unstructured
Give up and revert to "$CC -dumpversion". Since by now no test now refers to patchlevel, make it unavailable in GCCVER so that nobody tries to use it. Change-Id: Ife0bb0a94a73555d1f19f5a3c5853148042c7bba
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 4 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 3660ace9395a..8fc59dc5fb9c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2929,12 +2929,11 @@ dnl Test the gcc version
dnl ===================================================================
if test "$GCC" = "yes"; then
AC_MSG_CHECKING([the GCC version])
- _gcc_version=$($CC --version|head -n1|sed -e 's/^.*[^.[:digit:]]\(\([[:digit:]]\+\.\)\{1,2\}[[:digit:]]\+\).*/\1/')
- _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
- GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
+ _gcc_version=`$CC -dumpversion`
+ GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*100+\$2 }'`
AC_MSG_RESULT([gcc $_gcc_version])
- if test "$GCCVER" -lt 040000; then
+ if test "$GCCVER" -lt 0400; then
AC_MSG_ERROR([GCC $_gcc_version is too old, must be at least GCC 4.0.0])
fi
fi
@@ -5612,7 +5611,7 @@ if test "$GCC" = "yes"; then
#endif
]])],[HAVE_THREADSAFE_STATICS=TRUE],[])
AC_LANG_POP([C++])
- elif test "${GCCVER?}" -ge 040300; then
+ elif test "${GCCVER?}" -ge 0403; then
HAVE_THREADSAFE_STATICS=TRUE
fi
fi