summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorMarcel Raad <raad@teamviewer.com>2017-05-31 22:21:42 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2017-06-01 08:48:05 +0200
commit5598b0bd63f690c151074494ce47ef872f004ab4 (patch)
treedb80ada6312077335cb8bad0fb6bcccd22ed9076 /m4
parentc5de7f50f73919ead96aa1b541090cb25d63b012 (diff)
downloadcurl-5598b0bd63f690c151074494ce47ef872f004ab4.tar.gz
curl-compilers.m4: fix compiler_num for clang
"clang -dumpversion" always returns "4.2.1", the GCC version that clang was initially compatible to. Use "clang -v" instead, which returns the actual clang version. Fixes https://github.com/curl/curl/issues/1522 Closes https://github.com/curl/curl/pull/1523
Diffstat (limited to 'm4')
-rw-r--r--m4/curl-compilers.m42
1 files changed, 1 insertions, 1 deletions
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
index 673f64097..dcca88493 100644
--- a/m4/curl-compilers.m4
+++ b/m4/curl-compilers.m4
@@ -84,7 +84,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_CLANG], [
if test "$curl_cv_have_def___clang__" = "yes"; then
AC_MSG_RESULT([yes])
compiler_id="CLANG"
- clangver=`$CC -dumpversion`
+ clangver=`$CC -v 2>&1 | grep version | sed "s/.*version \([0-9]*\.[0-9]*\).*/\1/"`
clangvhi=`echo $clangver | cut -d . -f1`
clangvlo=`echo $clangver | cut -d . -f2`
compiler_num=`(expr $clangvhi "*" 100 + $clangvlo) 2>/dev/null`