[MPlayer-dev-eng] Patch for configure to automatically find gcc3 on RH systems

Malcolm malc at cyberserf.co.uk
Fri Dec 28 22:37:49 CET 2001


Hi all,

Been lurking for some time following the development of this fine
application.  Congrats to all involved for getting it this far.
I don't have a whole bunch of time to contribute stuff I'm afraid, but
here is a small patch to 'configure' to make it look for gcc3 which is
what RH users' working gcc is called if they install the corresponding
rpm's (or do full install like I often lazily do). It will only do this
when it finds a broken gcc.

Constructive criticism welcomed (I will crawl quietly back into my hole
if you tell me to go RTF man sh ;-)

Malc.






-------------- next part --------------
diff -Naur configure.orig configure
--- configure.orig      Sat Dec 29 05:17:23 2001
+++ configure   Sat Dec 29 05:33:53 2001
@@ -339,6 +339,21 @@
       ;;
   esac
   echores "$cc_version"
+  # If gcc version is crappy RH one, then check if the user has installed the optional 
+  # (at least in RH7.2) gcc3 packages to save them some pain - malc at tmbg.co.uk
+  if [ ! -z "$cc_verc_fail" ] ; then
+      echocheck "gcc3 version (As found on some (7.2) Redhat Distributions)"
+      _cc=gcc3
+      cc_version=`$_cc -v 2>&1 | sed -n 's/^.*version \([aegcygnustp-]*[0-9.]*\).*$/\1/p'`
+      case $cc_version in
+        '') cc_version="v. ?.??, bad"; cc_verc_fail=yes;;
+        2.95.[2-9]|2.95.[2-9].[0-9]|3.[0-9]|3.[0-9].[0-9])
+           cc_version="$cc_version, ok" ; cc_verc_fail='';;
+        *) cc_version="$cc_version, bad"; cc_verc_fail=yes;;
+      esac
+      echo "$cc_version"
+  fi
+
   if test "$cc_verc_fail" ; then
     cat <<EOF
 



More information about the MPlayer-dev-eng mailing list