[MPlayer-dev-eng] [PATCH] OS/X, Darwin _altivec
Steven M. Schultz
sms at 2BSD.COM
Fri Jun 13 07:50:42 CEST 2003
Hi -
I ran into a couple bugs in the ./configure script when building
MPlayer on OS/X tonight. There was a single '=' instead of '=='
in a test, but the more serious bug was the unconditional setting
of _altivec to 'no'. It appears that _altivec was being reset to
'no' while testing for altivec.h - Darwin has altivec instructions
but not altivec.h
Patch appended below for your consideration.
Steven Schultz
-------------------------------snip-----------------------
--- configure.dist Thu Jun 12 22:03:50 2003
+++ configure Thu Jun 12 22:45:38 2003
@@ -1995,6 +1995,7 @@
#include <altivec.h>
int main(void) { return 0; }
EOF
+save_altivec=$_altivec
_altivec=no
cc_check && _altivec=yes
if test "$_altivec" = yes ; then
@@ -2006,6 +2007,7 @@
else
_def_altivec_h='#undef HAVE_ALTIVEC_H'
fi
+_altivec=$save_altivec
echocheck "dynamic loader"
cat > $TMPC << EOF
@@ -5118,7 +5120,10 @@
# use gnu style cpp on Darwin
CFLAGS="$CFLAGS -no-cpp-precomp -DSYS_DARWIN"
# libavcodec (from ffmpeg) requires CONFIG_DARWIN to enable AltiVec on Darwin/MacOSX
- test "$_altivec" = yes && CFLAGS="$CFLAGS -DCONFIG_DARWIN"
+echo DARWIN altivec is $_altivec
+ if test "$_altivec" == yes; then
+ CFLAGS="$CFLAGS -DCONFIG_DARWIN"
+ fi
fi
if hpux ; then
# use flag for HPUX missing setenv()
More information about the MPlayer-dev-eng
mailing list