summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-05-30 18:03:36 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-05-30 18:03:36 +0000
commit6a131b0ddff5b81d13a7af04f13cdbe8946f0817 (patch)
tree93206c1cfe70ee08b6ac2048cbc6b864de3b8bbd /configure
parent09b97f48268ce10e22fb18082cfdbf35e93e7b2c (diff)
downloadmpv-6a131b0ddff5b81d13a7af04f13cdbe8946f0817.tar.bz2
mpv-6a131b0ddff5b81d13a7af04f13cdbe8946f0817.tar.xz
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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26930 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure30
1 files changed, 18 insertions, 12 deletions
diff --git a/configure b/configure
index 0ed33e9859..5d413be1d6 100755
--- a/configure
+++ b/configure
@@ -2422,24 +2422,30 @@ if ppc && ( test "$_altivec" = yes || test "$_runtime_cpudetection" = yes ) ; th
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