[FFmpeg-cvslog] r13555 - in trunk: configure libavutil/internal.h

diego subversion
Fri May 30 12:58:48 CEST 2008


Author: diego
Date: Fri May 30 12:58:48 2008
New Revision: 13555

Log:
Implement a proper configure test for AltiVec vector declaration syntax.


Modified:
   trunk/configure
   trunk/libavutil/internal.h

Modified: trunk/configure
==============================================================================
--- trunk/configure	(original)
+++ trunk/configure	Fri May 30 12:58:48 2008
@@ -714,6 +714,7 @@ HAVE_LIST="
     $ARCH_EXT_LIST
     $THREADS_LIST
     altivec_h
+    altivec_vector_braces
     arpa_inet_h
     bswap
     byteswap_h
@@ -1543,6 +1544,13 @@ int main(void) {
     return 0;
 }
 EOF
+
+    # check if our compiler supports braces for vector declarations
+    check_cc <<EOF && enable altivec_vector_braces
+$inc_altivec_h
+#define AVV(x...) {x}
+int main (void) { (vector int) AVV(1); return 0; }
+EOF
 fi
 
 # We have to check if pld is a nop and disable it.

Modified: trunk/libavutil/internal.h
==============================================================================
--- trunk/libavutil/internal.h	(original)
+++ trunk/libavutil/internal.h	Fri May 30 12:58:48 2008
@@ -50,11 +50,10 @@
 #endif
 #endif
 
-/* Use Apple-specific AltiVec syntax for vector declarations when necessary. */
-#ifdef __APPLE_CC__
-#define AVV(x...) (x)
-#else
+#ifdef HAVE_ALTIVEC_VECTOR_BRACES
 #define AVV(x...) {x}
+#else
+#define AVV(x...) (x)
 #endif
 
 #ifndef M_PI




More information about the ffmpeg-cvslog mailing list