Mercurial > mplayer.hg
comparison configure @ 11108:fde91c95c875
some darwin patches (hostinfo,xmms), based on patch by Chris Zubrzycki <beren@mac.com>
author | alex |
---|---|
date | Tue, 14 Oct 2003 09:41:08 +0000 |
parents | 80a90c3e2f89 |
children | 1d2c30ef6c11 |
comparison
equal
deleted
inserted
replaced
11107:0642317d985f | 11108:fde91c95c875 |
---|---|
571 _cpuinfo="cat /proc/cpuinfo" | 571 _cpuinfo="cat /proc/cpuinfo" |
572 elif test -r /compat/linux/proc/cpuinfo ; then | 572 elif test -r /compat/linux/proc/cpuinfo ; then |
573 # FreeBSD with Linux emulation /proc mounted, | 573 # FreeBSD with Linux emulation /proc mounted, |
574 # extract CPU information from it | 574 # extract CPU information from it |
575 _cpuinfo="cat /compat/linux/proc/cpuinfo" | 575 _cpuinfo="cat /compat/linux/proc/cpuinfo" |
576 elif darwin ; then | |
577 # use hostinfo on Darwin | |
578 _cpuinfo="hostinfo" | |
576 elif x86; then | 579 elif x86; then |
577 # all other OSes try to extract CPU information from a small helper | 580 # all other OSes try to extract CPU information from a small helper |
578 # program TOOLS/cpuinfo instead | 581 # program TOOLS/cpuinfo instead |
579 $_cc -o TOOLS/cpuinfo TOOLS/cpuinfo.c | 582 $_cc -o TOOLS/cpuinfo TOOLS/cpuinfo.c |
580 _cpuinfo="TOOLS/cpuinfo" | 583 _cpuinfo="TOOLS/cpuinfo" |
842 if test -n "`$_cpuinfo | grep altivec`"; then | 845 if test -n "`$_cpuinfo | grep altivec`"; then |
843 _altivec=yes | 846 _altivec=yes |
844 fi | 847 fi |
845 fi | 848 fi |
846 if darwin ; then | 849 if darwin ; then |
850 proc=`$_cpuinfo | grep "Processor type" | cut -f 3 -d ' ' | sed 's/ppc//'` | |
847 if [ `sysctl -n hw.vectorunit` -eq 1 ]; then | 851 if [ `sysctl -n hw.vectorunit` -eq 1 ]; then |
848 _altivec=yes | 852 _altivec=yes |
849 fi | 853 fi |
854 if [ `sysctl -n hw.optional.altivec` -eq 1 ]; then | |
855 _altivec=yes | |
856 fi | |
850 fi | 857 fi |
851 if test "$_altivec" = yes; then | 858 if test "$_altivec" = yes; then |
852 echores "$proc altivec" | 859 echores "$proc altivec" |
853 else | 860 else |
854 echores "$proc" | 861 echores "$proc" |
1975 int main(void) { (void) gethostbyname(0); return 0; } | 1982 int main(void) { (void) gethostbyname(0); return 0; } |
1976 EOF | 1983 EOF |
1977 cc_check -lsocket && _ld_sock="-lsocket" | 1984 cc_check -lsocket && _ld_sock="-lsocket" |
1978 cc_check -lnsl && _ld_sock="-lnsl" | 1985 cc_check -lnsl && _ld_sock="-lnsl" |
1979 cc_check -lsocket -lnsl && _ld_sock="-lsocket -lnsl" | 1986 cc_check -lsocket -lnsl && _ld_sock="-lsocket -lnsl" |
1987 cc_check -lsocket -ldnet && _ld_sock="-lsocket -ldnet" | |
1980 if test $_winsock2 = auto && not cygwin ; then | 1988 if test $_winsock2 = auto && not cygwin ; then |
1981 _winsock2=no | 1989 _winsock2=no |
1982 cat > $TMPC << EOF | 1990 cat > $TMPC << EOF |
1983 #include <winsock2.h> | 1991 #include <winsock2.h> |
1984 int main(void) { (void) gethostbyname(0); return 0; } | 1992 int main(void) { (void) gethostbyname(0); return 0; } |
5237 _xmmslibdir=/usr/lib | 5245 _xmmslibdir=/usr/lib |
5238 fi | 5246 fi |
5239 fi | 5247 fi |
5240 | 5248 |
5241 _def_xmms='#define HAVE_XMMS 1' | 5249 _def_xmms='#define HAVE_XMMS 1' |
5242 _xmms_lib="${_xmmslibdir}/libxmms.so.1 -export-dynamic" | 5250 if darwin ; then |
5251 _xmms_lib="${_xmmslibdir}/libxmms.dylib" | |
5252 else | |
5253 _xmms_lib="${_xmmslibdir}/libxmms.so.1 -export-dynamic" | |
5254 fi | |
5243 else | 5255 else |
5244 _def_xmms='#undef HAVE_XMMS' | 5256 _def_xmms='#undef HAVE_XMMS' |
5245 fi | 5257 fi |
5246 echores "$_xmms" | 5258 echores "$_xmms" |
5247 | 5259 |
5472 | 5484 |
5473 EOF | 5485 EOF |
5474 fi | 5486 fi |
5475 if darwin ; then | 5487 if darwin ; then |
5476 # use gnu style cpp on Darwin | 5488 # use gnu style cpp on Darwin |
5477 CFLAGS="$CFLAGS -no-cpp-precomp -DSYS_DARWIN" | 5489 CFLAGS="$CFLAGS -no-cpp-precomp -DSYS_DARWIN -Wl,-bind_at_load" |
5478 # libavcodec (from ffmpeg) requires CONFIG_DARWIN to enable AltiVec on Darwin/MacOSX | 5490 # libavcodec (from ffmpeg) requires CONFIG_DARWIN to enable AltiVec on Darwin/MacOSX |
5479 test "$_altivec" = yes && CFLAGS="$CFLAGS -DCONFIG_DARWIN" | 5491 test "$_altivec" = yes && CFLAGS="$CFLAGS -DCONFIG_DARWIN" |
5480 fi | 5492 fi |
5481 if hpux ; then | 5493 if hpux ; then |
5482 # use flag for HPUX missing setenv() | 5494 # use flag for HPUX missing setenv() |