From a3d37001afe85cdf7849a8292562eb2755fa5c27 Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 4 May 2008 11:35:07 +0000 Subject: Rewrite (gcc) compiler check to default to enabling compilation and not set gcc-specific variables before the compiler is confirmed to be gcc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26668 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 8cf60af9fb..89f0ff11cc 100755 --- a/configure +++ b/configure @@ -1419,7 +1419,6 @@ if test "`basename $_cc`" = "icc" || test "`basename $_cc`" = "ecc"; then ;; 10.1) cc_version="$cc_version, ok" - cc_fail=no ;; *) cc_version="$cc_version, bad" @@ -1428,36 +1427,26 @@ if test "`basename $_cc`" = "icc" || test "`basename $_cc`" = "ecc"; then esac echores "$cc_version" else - for _cc in "$_cc" gcc cc ; do + for _cc in "$_cc" cc gcc ; do + cc_name_tmp=`$_cc -v 2>&1 | _tail 1 | cut -d ' ' -f 1` + if test "$cc_name_tmp" = "gcc"; then + cc_name=$cc_name_tmp echocheck "$_cc version" cc_vendor=gnu - cc_name=`$_cc -v 2>&1 | _tail 1 | cut -d ' ' -f 1` cc_version=`$_cc -dumpversion 2>&1` - if test "$?" -gt 0; then - cc_version="not found" - fi case $cc_version in - '') - cc_version="v. ?.??, bad" + 2.96*) cc_fail=yes ;; - 2.95.[2-9]|2.95.[2-9][-.]*|[3-4].*) + *) _cc_major=`echo $cc_version | cut -d '.' -f 1` _cc_minor=`echo $cc_version | cut -d '.' -f 2` _cc_mini=`echo $cc_version | cut -d '.' -f 3` - cc_version="$cc_version, ok" - cc_fail=no - ;; - 'not found') - cc_fail=yes - ;; - *) - cc_version="$cc_version, bad" - cc_fail=yes ;; esac echores "$cc_version" - test "$cc_fail" = "no" && break + break + fi done fi # icc test "$cc_fail" = yes && die "unsupported compiler version" -- cgit v1.2.3