summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-09-13 13:16:10 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-09-13 13:16:10 +0200
commit2d22b39fb7ddbb02f246e2943b228931e5d583e1 (patch)
tree0ab32e6db01fb1f0d3113b5310c032d7acd89d0a /configure.ac
parenttdf#112133: Drop the Add and Remove labels (diff)
downloadcore-2d22b39fb7ddbb02f246e2943b228931e5d583e1.tar.gz
core-2d22b39fb7ddbb02f246e2943b228931e5d583e1.zip
Clamp minor/patchlevel when computing CLANG_VERSION
...so it doesn't overflow for odd version numbers like <https://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=MASTER &full-log=1505293801.994#53>'s 'clang --version' reportedly returning "Android clang version 5.0.300080 (based on LLVM 5.0.300080) […]" Change-Id: I7e3b3e0fa93d48fbbfa7a9b71e91776f976ed0da
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index edfc281ebfb0..5f7f7c918fc1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3668,7 +3668,8 @@ if test "$COM_IS_CLANG" = TRUE; then
fi
clang_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | $CC_PLAIN $my_args -`
CLANG_FULL_VERSION=`echo __clang_version__ | $CC_PLAIN $my_args -`
- CLANGVER=`echo $clang_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
+ CLANGVER=`echo $clang_version \
+ | $AWK -F. '{ print \$1*10000+(\$2<100?\$2:99)*100+(\$3<100?\$3:99) }'`
AC_MSG_RESULT([Clang $CLANG_FULL_VERSION, $CLANGVER])
AC_DEFINE_UNQUOTED(CLANG_VERSION,$CLANGVER)
AC_DEFINE_UNQUOTED(CLANG_FULL_VERSION,$CLANG_FULL_VERSION)