diff options
author | atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-05-03 19:00:54 +0000 |
---|---|---|
committer | atmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-05-03 19:00:54 +0000 |
commit | 9d883ac048475aaa3248cd2b661608c98f24ba9b (patch) | |
tree | a936e98e3e8b8dddb4b44852595844eec81028f1 /configure | |
parent | 879e05a7c17cd287db8d51dc3a8a4ee130501b35 (diff) | |
download | mpv-9d883ac048475aaa3248cd2b661608c98f24ba9b.tar.bz2 mpv-9d883ac048475aaa3248cd2b661608c98f24ba9b.tar.xz |
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.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5948 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 39 |
1 files changed, 12 insertions, 27 deletions
@@ -65,6 +65,7 @@ bsdos() { issystem "BSD/OS" ; return "$?" ; } 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 @@ if test -z "$_target" ; then # 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 @@ if test -z "$_target" ; then 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 @@ fi # 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 @@ if test "$_skip_cc_check" != yes ; then ;; 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 @@ To do so, execute 'CFLAGS= ./configure <options>' 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" |