aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2015-12-20 18:35:41 +0100
committerWillem Jan Palenstijn2015-12-20 18:35:41 +0100
commitd28ec8a4a480246ff6a4f18e5fd9659ed8bb1747 (patch)
treeb46b05c1bc349be162e091c3dd2d9f22c924aa21
parent582c726f4cc13edbf8bd3e0d4663a9819975e954 (diff)
downloadscummvm-rg350-d28ec8a4a480246ff6a4f18e5fd9659ed8bb1747.tar.gz
scummvm-rg350-d28ec8a4a480246ff6a4f18e5fd9659ed8bb1747.tar.bz2
scummvm-rg350-d28ec8a4a480246ff6a4f18e5fd9659ed8bb1747.zip
CONFIGURE: Report clang compiler version
Our previous code printed the gcc version clang is pretending to be.
-rwxr-xr-xconfigure12
1 files changed, 11 insertions, 1 deletions
diff --git a/configure b/configure
index e0d412daad..e1ee583b9c 100755
--- a/configure
+++ b/configure
@@ -1720,7 +1720,17 @@ if test "$have_gcc" = yes; then
_cxx_minor=`gcc_get_define __GNUC_MINOR__`
cxx_version="`( $CXX -dumpversion ) 2>&1`"
- if test "$_cxx_major" -eq 2 && test "$_cxx_minor" -ge 95 || \
+ if test "$have_clang" = yes; then
+ # Clang sets a gcc version number for compatibility.
+ # We keep that as _cxx_minor/_cxx_major for later
+ # compiler version checks.
+
+ # For the version reported in the configure log (cxx_version),
+ # we get the actual clang version.
+ cxx_version=`gcc_get_define __clang_version__`
+ cxx_version="`echo "${cxx_version}" | sed -e 's/"\([^ ]\+\) .*/\1/'`"
+ cxx_version="clang $cxx_version, ok"
+ elif test "$_cxx_major" -eq 2 && test "$_cxx_minor" -ge 95 || \
test "$_cxx_major" -gt 2 ; then
cxx_version="$cxx_version, ok"
cxx_verc_fail=no