aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorBrian Foley <bfoley@compsoc.nuigalway.ie>2002-09-02 08:48:12 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-09-02 08:48:12 +0000
commitab6c65f69307bff2a2d073a94b839619ab64386b (patch)
treea45a82147617f17f62aea7bf70d299623c41ecad /configure
parent004c18ee9ce785c33ffedcbb3b8749f4d63a9a2a (diff)
downloadffmpeg-ab6c65f69307bff2a2d073a94b839619ab64386b.tar.gz
altivec build tidyup patch by (Brian Foley <bfoley at compsoc dot nuigalway dot ie>)
Originally committed as revision 898 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure30
1 files changed, 30 insertions, 0 deletions
diff --git a/configure b/configure
index 1f94134263..39342a1c40 100755
--- a/configure
+++ b/configure
@@ -25,6 +25,7 @@ make="make"
strip="strip"
cpu=`uname -m`
mmx="default"
+altivec="default"
case "$cpu" in
i386|i486|i586|i686|i86pc|BePC)
cpu="x86"
@@ -161,6 +162,8 @@ for opt do
;;
--disable-mmx) mmx="no"
;;
+ --disable-altivec) altivec="no"
+ ;;
--enable-gprof) gprof="yes"
;;
--disable-v4l) v4l="no"
@@ -201,6 +204,27 @@ if test $mmx = "default"; then
fi
fi
+# Can only do AltiVec on PowerPC
+if test $altivec = "default"; then
+ if test $cpu = "powerpc"; then
+ altivec="yes"
+ else
+ altivec="no"
+ fi
+fi
+
+# See does our compiler support Motorola AltiVec C API
+if test $altivec = "yes"; then
+cat > $TMPC << EOF
+int main(void) {
+ vector signed int v1, v2, v3;
+ v1 = vec_add(v2,v3);
+ return 0;
+}
+EOF
+$cc -o $TMPO $TMPC -faltivec 2> /dev/null || altivec="no"
+fi
+
# Checking for CFLAGS
if test -z "$CFLAGS"; then
CFLAGS="-O3"
@@ -324,6 +348,7 @@ echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
echo " --cpu=CPU force cpu to CPU [$cpu]"
echo " --disable-mmx disable mmx usage"
+echo " --disable-altivec disable AltiVec usage"
echo " --disable-audio-oss disable OSS audio support [default=no]"
echo " --disable-v4l disable video4linux grabbing [default=no]"
echo " --disable-network disable network support [default=no]"
@@ -345,6 +370,7 @@ echo "make $make"
echo "CPU $cpu"
echo "Big Endian $bigendian"
echo "MMX enabled $mmx"
+echo "AltiVec enabled $altivec"
echo "gprof enabled $gprof"
echo "zlib enabled $zlib"
echo "mp3lame enabled $mp3lame"
@@ -391,6 +417,10 @@ if test "$mmx" = "yes" ; then
echo "TARGET_MMX=yes" >> config.mak
echo "#define HAVE_MMX 1" >> $TMPH
fi
+if test "$altivec" = "yes" ; then
+ echo "TARGET_ALTIVEC=yes" >> config.mak
+ echo "#define HAVE_ALTIVEC 1" >> $TMPH
+fi
if test "$gprof" = "yes" ; then
echo "TARGET_GPROF=yes" >> config.mak
echo "#define HAVE_GPROF 1" >> $TMPH