[Mplayer-cvslog] CVS: main configure,1.456,1.457

Atmosfear atmos4 at mplayerhq.hu
Fri May 3 21:00:57 CEST 2002


Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv16657

Modified Files:
	configure 
Log Message:
Add Darwin (MacOS X) detection and configuration and modify compiler check to check through defined-cc, gcc3, cc to find good compiler. Abort on first good compiler.


Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.456
retrieving revision 1.457
diff -u -r1.456 -r1.457
--- configure	3 May 2002 09:43:36 -0000	1.456
+++ configure	3 May 2002 19:00:54 -0000	1.457
@@ -65,6 +65,7 @@
 openbsd() { issystem "OpenBSD" ; return "$?" ; }
 bsd()     { freebsd || netbsd || bsdos || openbsd ; return "$?" ; }
 qnx()     { issystem "QNX"     ; return "$?" ; }
+darwin()  { issystem "Darwin"  ; return "$?" ; }
 
 # arch test boolean functions
 x86() {
@@ -280,7 +281,7 @@
   # OS name
   system_name=`( uname -s ) 2>&1`
   case "$system_name" in
-  Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX)
+  Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin)
     ;;
   IRIX*)
     system_name=IRIX
@@ -299,7 +300,9 @@
    case "$host_arch" in
    i386|sparc|ppc|alpha|arm|mips)
      ;;
-
+   powerpc) # Darwin returns 'powerpc'
+     host_arch=ppc
+     ;;
    *) # uname -p on Linux returns 'unknown' for the processor type,
       # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
 
@@ -363,9 +366,8 @@
 # Checking CC version...
 # gcc-3.0 merges optimizations coming from egcs, pgcc, agcc, ...
 if test "$_skip_cc_check" != yes ; then
+ for _cc in $_cc gcc3 cc; do
   echocheck "$_cc version"
-  # also check for name (the version checking is only for _gcc_ up for now)
-  # FIXME implement this in ver. check.
   cc_name=`$_cc -v 2>&1 | tail -1 | cut -d ' ' -f 1`
   cc_version=`$_cc -v 2>&1 | sed -n 's/^.*version \([aegcygnustp-]*[0-9.]*\).*$/\1/p'`
   case $cc_version in
@@ -383,28 +385,8 @@
       ;;
   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 test "$cc_verc_fail" = yes ; then
-    echocheck "gcc3 version"
-    _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=no
-        ;;
-      *)
-        cc_version="$cc_version, bad"
-        cc_verc_fail=yes
-        ;;
-    esac
-    echores "$cc_version"
-  fi
+  (test "$cc_verc_fail" = "no") && break
+ done 
   if test "$cc_verc_fail" = yes ; then
     cat <<EOF
 
@@ -3481,7 +3463,10 @@
 
 EOF
 fi
-
+if darwin ; then
+  # use gnu style cpp on Darwin
+  CFLAGS="$CFLAGS -no-cpp-precomp"
+fi
 # Thread support
 if linux ; then
   CFLAGS="$CFLAGS -D_REENTRANT"




More information about the MPlayer-cvslog mailing list