[MPlayer-dev-eng] [PATCH] Check for intrinsic support in configure
Zuxy Meng
zuxy.meng at gmail.com
Sat May 13 13:07:49 CEST 2006
Mostly copied from ffmpeg's configure:-)
--
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6
-------------- next part --------------
--- main/configure 2006-05-13 17:02:02.000000000 +0800
+++ main.new/configure 2006-05-13 19:04:11.000000000 +0800
@@ -879,7 +879,6 @@
proc=k6
else
proc=i586
- iproc=586
fi
;;
6) iproc=686
@@ -2305,6 +2304,36 @@
_def_sse2='#undef HAVE_SSE2'
test "$_sse2" = yes && _def_sse2='#define HAVE_SSE2 1'
+# Checking intrinsic's headers for use of ffmpeg
+_def_builtin_vector='#undef HAVE_BUILTIN_VECTOR'
+if test "$_sse" = yes ; then
+ echocheck "xmmintrin.h"
+ cat > $TMPC << EOF
+#include <xmmintrin.h>
+int main() { _mm_sfence ; return 0; }
+EOF
+ _builtin_vector=no
+ cc_check -msse && _builtin_vector=yes
+ if test "$_builtin_vector" = yes ; then
+ _def_builtin_vector='#define HAVE_BUILTIN_VECTOR 1'
+ fi
+ echores "$_builtin_vector"
+fi
+_def_mm3dnow='#undef HAVE_MM3DNOW'
+if test "$_3dnow" = yes ; then
+ echocheck "mm3dnow.h"
+ cat > $TMPC << EOF
+#include <mm3dnow.h>
+int main() { _m_femms(); return 0; }
+EOF
+ _mm3dnow=no
+ cc_check -m3dnow && _mm3dnow=yes
+ if test "$_mm3dnow" = yes ; then
+ _def_mm3dnow='#define HAVE_MM3DNOW 1'
+ fi
+ echores "$_mm3dnow"
+fi
+
# Checking kernel version...
if x86 && linux ; then
_k_verc_problem=no
@@ -7488,6 +7517,8 @@
TARGET_SSE = $_sse
TARGET_ALTIVEC = $_altivec
TARGET_VIS = $_vis
+TARGET_BUILTIN_VECTOR = $_builtin_vector
+TARGET_BUILTIN_3DNOW = $_mm3dnow
# --- GUI stuff ---
GTKINC = $_inc_gtk
@@ -8128,6 +8159,8 @@
$_def_altivec_h // enables usage of altivec.h
+$_def_builtin_vector // enables usage of xmmintrin.h
+$_def_mm3dnow // enables usage of mm3dnow.h
$_def_mlib // Sun mediaLib, available only on solaris
$_def_vis // only define if you have VIS ( ultrasparc )
More information about the MPlayer-dev-eng
mailing list