summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-06-16 11:54:17 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-06-16 11:54:17 +0200
commit468fc3847cfd65217949630e2ffd9fb0a89e9cbb (patch)
tree13d5e3de7e9e5196f7fbed9c4ec6f6ba0341bca9 /configure.ac
parent99cc2f32060f8e2f7f732b65122771c2a61638ca (diff)
Work around GCC derivates with two-section 'gcc -dumpversion' output
...as happens e.g. with /usr/bin/gcc "gcc (SUSE Linux) 4.8.5" on gandalf.documentfoundation.org, reporting "4.8" instead of "4.8.5" (and thus failing since 579497164f6bddfeb14bb6b0f4b9cd3322af1803 "Bump GCC baseline to 4.8.1", e.g., <https://ci.libreoffice.org/job/lo_tb_master_linux/18923/>). Keep it simple and assume that the micro would be at least 1 when missing... Change-Id: I096dd6671ad012e5bf890d3bf510780661f62d24
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 15272b766644..9ebf25de6efd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3781,7 +3781,7 @@ if test "$GCC" = "yes" -a -z "$COM_IS_CLANG"; then
AC_MSG_CHECKING([the GCC version])
_gcc_version=`$CC -dumpversion`
gcc_full_version=$(printf '%s' "$_gcc_version" | \
- $AWK -F. '{ print $1*10000+$2*100+$3 }')
+ $AWK -F. '{ print $1*10000+$2*100+(NF<3?1:$3) }')
GCC_VERSION=`echo $_gcc_version | $AWK -F. '{ print \$1*100+\$2 }'`
AC_MSG_RESULT([gcc $_gcc_version ($gcc_full_version)])