diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2007-12-10 21:30:22 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2007-12-10 21:30:22 +0000 |
commit | ecf842998f481acd5f71d91e4572f11f68fbf97b (patch) | |
tree | cdc17f0b40641e66977febc3b28cfb00c4cabae1 /lib/pixman/configure.ac | |
parent | 787595b066638d9ddf0ca460b4c06f06f75d3fd5 (diff) |
Merge pixman 0.9.6. Valery Masiutsin and other report that it fixes some
X crashes on amd64. Bump major since one function was removed.
Diffstat (limited to 'lib/pixman/configure.ac')
-rw-r--r-- | lib/pixman/configure.ac | 45 |
1 files changed, 39 insertions, 6 deletions
diff --git a/lib/pixman/configure.ac b/lib/pixman/configure.ac index 3a235b564..edbc8c7af 100644 --- a/lib/pixman/configure.ac +++ b/lib/pixman/configure.ac @@ -42,7 +42,7 @@ AC_PREREQ([2.57]) m4_define([pixman_major], 0) m4_define([pixman_minor], 9) -m4_define([pixman_micro], 5) +m4_define([pixman_micro], 6) m4_define([pixman_version],[pixman_major.pixman_minor.pixman_micro]) @@ -86,10 +86,10 @@ if test "x$GCC" = "xyes"; then dnl =========================================================================== dnl Check for MMX -MMX_CFLAGS="-mmmx -msse -Winline --param inline-unit-growth=10000 --param large-function-growth=10000" +MMX_CFLAGS="-mmmx -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) +AC_MSG_CHECKING(whether to use MMX intrinsics) xserver_save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $MMX_CFLAGS" AC_COMPILE_IFELSE([ @@ -97,10 +97,8 @@ AC_COMPILE_IFELSE([ #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 @@ -111,11 +109,46 @@ if test $have_mmx_intrinsics = yes ; then else MMX_CFLAGS= fi -AC_SUBST(MMX_CFLAGS) AM_CONDITIONAL(USE_MMX, test $have_mmx_intrinsics = yes) +dnl ======================================================= + +dnl GCC 4.2 when compiling with -msse will generate SSE instructions +dnl on its own. This means anything compiled with -mss can only be +dnl run after a runtime check for SSE. Unfortunately, since we still +dnl need to support MMX-but-not-SSE (such as the OLPC), this means we +dnl can only use SSE when compiling for x86-64 (where SSE is always +dnl supported). + +have_sse_intrinsics=no +AC_MSG_CHECKING(whether to use SSE intrinsics) +xserver_save_CFLAGS=$CFLAGS +CFLAGS="$CFLAGS -msse $MMX_CFLAGS" + +AC_COMPILE_IFELSE([ +#if !defined(__amd64__) && !defined(__x86_64__) +#error "Need x86-64 for SSE" +#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_sse_intrinsics=yes) +CFLAGS=$xserver_save_CFLAGS +AC_MSG_RESULT($have_sse_intrinsics) + +if test $have_sse_intrinsics = yes ; then + AC_DEFINE(USE_SSE, 1, [use SSE compiler intrinsics]) + MMX_CFLAGS="-msse $MMX_CFLAGS" +fi + +AM_CONDITIONAL(USE_SSE, test $have_sse_intrinsics = yes) + dnl ======================================================== +AC_SUBST(MMX_CFLAGS) #PKG_CHECK_MODULES(GTK, [gtk+-2.0], [HAVE_GTK=yes], [HAVE_GTK=no]) HAVE_GTK=no |