[MPlayer-cvslog] r26930 - trunk/configure
diego
subversion at mplayerhq.hu
Fri May 30 20:03:36 CEST 2008
Author: diego
Date: Fri May 30 20:03:36 2008
New Revision: 26930
Log:
Rework AltiVec CFLAGS detection. '-maltivec -mabi=altivec' should be used
only when altivec.h is available and preferred over '-faltivec'.
This should now finally work on all Mac OS X and gcc combinations.
Modified:
trunk/configure
Modified: trunk/configure
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Fri May 30 20:03:36 2008
@@ -2422,24 +2422,30 @@ if ppc && ( test "$_altivec" = yes || te
cat > $TMPC << EOF
int main(void) { return 0; }
EOF
- cc_check -maltivec -mabi=altivec \
- && _altivec_gcc_flags="-maltivec -mabi=altivec" \
- || { cc_check -faltivec && _altivec_gcc_flags=-faltivec ; } \
- || { _altivec=no && _altivec_gcc_flags="none, AltiVec disabled" ; }
- echores "$_altivec_gcc_flags"
-
+ if $(cc_check -maltivec -mabi=altivec) ; then
+ _altivec_gcc_flags="-maltivec -mabi=altivec"
# check if <altivec.h> should be included
- echocheck "altivec.h"
_def_altivec_h='#undef HAVE_ALTIVEC_H'
- _have_altivec_h=no
cat > $TMPC << EOF
#include <altivec.h>
int main(void) { return 0; }
EOF
- cc_check $_altivec_gcc_flags && _have_altivec_h=yes \
- && inc_altivec_h="#include <altivec.h>" \
- && _def_altivec_h='#define HAVE_ALTIVEC_H 1'
- echores "$_have_altivec_h"
+ if $(cc_check $_altivec_gcc_flags) ; then
+ _def_altivec_h='#define HAVE_ALTIVEC_H 1'
+ inc_altivec_h='#include <altivec.h>'
+ else
+ cat > $TMPC << EOF
+int main(void) { return 0; }
+EOF
+ if $(cc_check -faltivec) ; then
+ _altivec_gcc_flags="-faltivec"
+ else
+ _altivec=no
+ _altivec_gcc_flags="none, AltiVec disabled"
+ fi
+ fi
+ fi
+ echores "$_altivec_gcc_flags"
# check if the compiler supports braces for vector declarations
cat > $TMPC << EOF
More information about the MPlayer-cvslog
mailing list