Mercurial > mplayer.hg
changeset 5947:5b8b0027c1e8
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.
author | atmos4 |
---|---|
date | Fri, 03 May 2002 19:00:54 +0000 |
parents | 9243f7464324 |
children | efce49503129 |
files | configure |
diffstat | 1 files changed, 12 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/configure Fri May 03 18:42:43 2002 +0000 +++ b/configure Fri May 03 19:00:54 2002 +0000 @@ -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@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"