summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-06-27 19:07:51 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-02 04:11:43 +0200
commit15a5cb8525fff7901d6100e833193ac05594cb49 (patch)
tree214214b1ac7467d78a2c5cd5a754055d29e934e6 /configure
parent41d25ebcc8bc8601bd66f5435c75fdff25cadc17 (diff)
downloadmpv-15a5cb8525fff7901d6100e833193ac05594cb49.tar.bz2
mpv-15a5cb8525fff7901d6100e833193ac05594cb49.tar.xz
configure: Experimental support for clang compiler.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31569 b3059339-0415-0410-9bf9-f77b7e298cf2 clang also does not support -march=native. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31570 b3059339-0415-0410-9bf9-f77b7e298cf2 Simplify clang version extraction. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31571 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure13
1 files changed, 11 insertions, 2 deletions
diff --git a/configure b/configure
index 656e1ea443..6c10aea5ea 100755
--- a/configure
+++ b/configure
@@ -1490,6 +1490,15 @@ else
echores "$cc_version"
break
fi
+ cc_name_tmp=$($_cc -v 2>&1 | head -n 1 | cut -d ' ' -f 1)
+ if test "$cc_name_tmp" = "clang"; then
+ echocheck "$_cc version"
+ cc_vendor=clang
+ cc_version=$($_cc -dumpversion 2>&1)
+ res_comment="experimental support only"
+ echores "clang $cc_version"
+ break
+ fi
cc_name_tmp=$($_cc -V 2>&1 | head -n 1 | cut -d ' ' -f 2,3)
if test "$cc_name_tmp" = "Sun C"; then
echocheck "$_cc version"
@@ -1813,7 +1822,7 @@ cat > $TMPC << EOF
int main(void) { return 0; }
EOF
if test "$_runtime_cpudetection" = no ; then
- if test $cc_vendor != "intel" ; then
+ if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
cc_check -march=native && proc=native
fi
if test "$proc" = "amdfam10"; then
@@ -1966,7 +1975,7 @@ int main(void) { return 0; }
EOF
# This is a stripped-down version of the i386 fallback.
if test "$_runtime_cpudetection" = no ; then
- if test $cc_vendor != "intel" ; then
+ if test $cc_vendor != "intel" && test $cc_vendor != "clang" ; then
cc_check -march=native && proc=native
fi
# --- AMD processors ---