summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-05-04 11:35:07 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-05-04 11:35:07 +0000
commita3d37001afe85cdf7849a8292562eb2755fa5c27 (patch)
tree372adecf5bcc5e7cd62b77273aaf6069153ccec9 /configure
parent462874ba64bd20b57d4f284a1cfcd8939367adbc (diff)
downloadmpv-a3d37001afe85cdf7849a8292562eb2755fa5c27.tar.bz2
mpv-a3d37001afe85cdf7849a8292562eb2755fa5c27.tar.xz
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
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure27
1 files changed, 8 insertions, 19 deletions
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"