summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2003-08-11 20:27:17 +0000
committerAlex Beregszaszi <alex@rtfs.hu>2003-08-11 20:27:17 +0000
commitb6e52719c643ec5c10763612b605611e7151ec82 (patch)
treed480477012223fed5b250d56529ba679528aacf4 /configure
parentc95108037fa64fb80b306bc5bec12aa4c98208d1 (diff)
Simplified and fixed altivec/altivec.h detection under Linux and Darwin (and others). Patch by Magnus Damm <damm@opensource.se>
Originally committed as revision 2120 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure19
1 files changed, 13 insertions, 6 deletions
diff --git a/configure b/configure
index 53afe7c18d..dc20f6e8bb 100755
--- a/configure
+++ b/configure
@@ -419,6 +419,17 @@ if test $tune != "generic"; then
esac
fi
+# AltiVec flags: The FSF version of GCC differs from the Darwin version
+if test $cpu = "powerpc"; then
+ if test $altivec = "yes"; then
+ if test "$darwin" = "yes"; then
+ CFLAGS="$CFLAGS -faltivec"
+ else
+ CFLAGS="$CFLAGS -maltivec -mabi=altivec"
+ fi
+ fi
+fi
+
# See if we have <altivec.h>
cat > $TMPC << EOF
#include <altivec.h>
@@ -426,7 +437,7 @@ int main( void ) { return 0; }
EOF
_altivec_h="no"
-if $cc -o $TMPE $TMPC 2> /dev/null ; then
+if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
_altivec_h="yes"
fi
@@ -450,11 +461,7 @@ int main(void) {
}
EOF
fi
-if test "$darwin" = "yes"; then
-$cc -o $TMPE $TMPC -faltivec 2> /dev/null || altivec="no"
-else
-$cc -o $TMPE $TMPC -maltivec -mabi=altivec 2> /dev/null || altivec="no"
-fi
+$cc $CFLAGS -o $TMPE $TMPC 2> /dev/null || altivec="no"
fi
# Can only do mmi on mips