]> granicus.if.org Git - curl/commit
curl-compilers.m4: fix unknown-warning-option on Apple clang
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Thu, 22 Jun 2017 23:28:17 +0000 (01:28 +0200)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Sat, 24 Jun 2017 09:10:38 +0000 (11:10 +0200)
commite5d6aa8d613e892b513fa8224aa96d2a5008274f
tree62b1fd5286f58f5be3354d6fc6e2ecd59af51e70
parent64ed44a815e4ee158ea1c0a57a714f0d501ad109
curl-compilers.m4: fix unknown-warning-option on Apple clang

Since 5598b0bd63f690c151074494ce47ef872f004ab4, clang -v is used to
detect the clang version. The version number was expected to come after
the word "version". For Apple clang, this doesn't work as it has its
own versioning scheme.
The version number is now first searched after the string
"based on LLVM". This works for Apple clang before version 7, and also
for e.g. Ubuntu's clang up to version 3.7. If it's not found and the
version string contains "Apple LLVM version", clang version 3.7 is
assumed, which is the version that comes with Xcode 7. Otherwise, the
version number is still expected after the word "version", which works
for very old Apple clang versions.

Ref: https://trac.macports.org/wiki/XcodeVersionInfo
Fixes https://github.com/curl/curl/issues/1606
Closes https://github.com/curl/curl/pull/1607
m4/curl-compilers.m4