[FFmpeg-cvslog] configure: clean up Altivec detection

Mans Rullgard git at videolan.org
Sun Apr 7 14:58:54 CEST 2013

ffmpeg | branch: release/0.10 | Mans Rullgard <mans at mansr.com> | Thu Aug 16 00:10:33 2012 +0100| [29a2fdb184b13efb7007d4b631cae2c35001c509] | committer: Reinhard Tartler

configure: clean up Altivec detection

There used to be one test for Altivec intrinsics support and a
separate test to determine which of two possible syntaxes to use
for vector literals.  Since 2008, we only support the more common
of these so the split test no longer makes sense.

This combines the tests into one and also changes the hard error on
failure to a warning.  The test can reasonably fail if no --cpu flag
is provided (or is provided with an unknown CPU) and the compiler
default target does not support Altivec.  Aborting in this case is
probably over-reacting.

Fixes: #464, http://bugs.debian.org/701710

Signed-off-by: Mans Rullgard <mans at mansr.com>
(cherry picked from commit 20bcce507aa6b9c866e34eee75d80305109767a8)

Signed-off-by: Reinhard Tartler <siretart at tauware.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=29a2fdb184b13efb7007d4b631cae2c35001c509

 configure |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/configure b/configure
index 2d17ce0..081854f 100755
--- a/configure
+++ b/configure
@@ -2723,17 +2723,14 @@ elif enabled ppc; then
         check_cc <<EOF || disable altivec
 int main(void) {
-    vector signed int v1, v2, v3;
-    v1 = vec_add(v2,v3);
+    vector signed int v1 = (vector signed int) { 0 };
+    vector signed int v2 = (vector signed int) { 1 };
+    v1 = vec_add(v1, v2);
     return 0;
-        # check if our compiler supports braces for vector declarations
-        check_cc <<EOF || die "You need a compiler that supports {} in AltiVec vector declarations."
-int main (void) { (vector int) {1}; return 0; }
+        enabled altivec || warn "Altivec disabled, possibly missing --cpu flag"
 elif enabled sparc; then

More information about the ffmpeg-cvslog mailing list