[cairo-commit] cairo ChangeLog, 1.894, 1.895 configure.in, 1.125, 1.126

Billy Biggs commit at pdx.freedesktop.org
Tue Aug 16 16:52:37 PDT 2005


Committed by: vektor

Update of /cvs/cairo/cairo
In directory gabe:/tmp/cvs-serv15628

Modified Files:
	ChangeLog configure.in 
Log Message:
	* configure.in: Add a check for the MMX intrinsics used by pixman.
	gcc >= 3.4 is required.



Index: ChangeLog
===================================================================
RCS file: /cvs/cairo/cairo/ChangeLog,v
retrieving revision 1.894
retrieving revision 1.895
diff -u -d -r1.894 -r1.895
--- ChangeLog	16 Aug 2005 23:41:10 -0000	1.894
+++ ChangeLog	16 Aug 2005 23:52:35 -0000	1.895
@@ -1,3 +1,8 @@
+2005-08-16  Billy Biggs  <vektor at dumbterm.net>
+
+	* configure.in: Add a check for the MMX intrinsics used by pixman.
+	gcc >= 3.4 is required.
+
 2005-08-16  Carl Worth  <cworth at cworth.org>
 
 	* src/cairoint.h (CAIRO_PRINTF_FORMAT): Rename cairo_printf_format

Index: configure.in
===================================================================
RCS file: /cvs/cairo/cairo/configure.in,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -d -r1.125 -r1.126
--- configure.in	13 Aug 2005 12:33:21 -0000	1.125
+++ configure.in	16 Aug 2005 23:52:35 -0000	1.126
@@ -439,6 +439,40 @@
 
 AC_SUBST(PKGCONFIG_REQUIRES)
 
+dnl ===========================================================================
+dnl Check for MMX
+
+MMX_CFLAGS="-mmmx -msse -Winline --param inline-unit-growth=10000 --param large-function-growth=10000"
+
+have_mmx_intrinsics=no
+AC_MSG_CHECKING(For MMX/SSE intrinsics in the compiler)
+xserver_save_CFLAGS=$CFLAGS
+CFLAGS="$CFLAGS $MMX_CFLAGS"
+AC_COMPILE_IFELSE([
+#if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4))
+#error "Need GCC >= 3.4 for MMX intrinsics"
+#endif
+#include <mmintrin.h>
+#include <xmmintrin.h>
+int main () {
+    __m64 v = _mm_cvtsi32_si64 (1);
+    v = _mm_shuffle_pi16 (v, _MM_SHUFFLE(3, 3, 3, 3));
+    return _mm_cvtsi64_si32 (v);
+}], have_mmx_intrinsics=yes)
+CFLAGS=$xserver_save_CFLAGS
+AC_MSG_RESULT($have_mmx_intrinsics)
+
+if test $have_mmx_intrinsics = yes ; then
+   AC_DEFINE(USE_MMX, 1, [use MMX compiler intrinsics])
+else
+   MMX_CFLAGS=
+fi
+AC_SUBST(MMX_CFLAGS)
+
+AM_CONDITIONAL(USE_MMX, test $have_mmx_intrinsics = yes)
+
+dnl ===========================================================================
+
 AC_OUTPUT([
 cairo.pc
 Makefile



More information about the cairo-commit mailing list