From 15a5cb8525fff7901d6100e833193ac05594cb49 Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 27 Jun 2010 19:07:51 +0000 Subject: 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 --- configure | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'configure') 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 --- -- cgit v1.2.3