1 --- a/pixman/pixman/pixman-x86.c
2 +++ b/pixman/pixman/pixman-x86.c
7 -#define _PIXMAN_X86_64 \
8 - (defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64))
9 +#if (defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64))
10 +#define _PIXMAN_X86_64 1
12 +#define _PIXMAN_X86_64 0
18 -#if _PIXMAN_X86_64 || defined (_MSC_VER)
19 +#if defined(__EMSCRIPTEN__)
23 +#elif _PIXMAN_X86_64 || defined (_MSC_VER)
31 +#if !defined(__EMSCRIPTEN__)
34 pixman_cpuid (uint32_t feature,
35 uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d)
37 #error Unknown compiler
41 +#endif // !__EMSCRIPTEN__
44 detect_cpu_features (void)
46 +#if defined(__EMSCRIPTEN__)
48 + return X86_MMX | X86_MMX_EXTENSIONS | X86_SSE | X86_SSE2 | X86_SSSE3;
52 cpu_features_t features = 0;
59 +#endif // !__EMSCRIPTEN__
63 --- a/pixman/pixman/pixman-ssse3.c
64 +++ b/pixman/pixman/pixman-ssse3.c
69 +#if !defined(__EMSCRIPTEN__)
72 #include <xmmintrin.h>
73 #include <emmintrin.h>
74 #include <tmmintrin.h>
75 --- a/pixman/configure
76 +++ b/pixman/configure
77 @@ -14207,7 +14207,11 @@
78 #if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4))
79 #error "Need GCC >= 3.4 for MMX intrinsics"
81 +#if !defined(__EMSCRIPTEN__)
84 +#include <xmmintrin.h>
88 /* Check support for block expressions */
89 @@ -14308,7 +14308,9 @@
90 # error "Need GCC >= 4.2 for SSE2 intrinsics on x86"
93 +#if !defined(__EMSCRIPTEN__)
96 #include <xmmintrin.h>
97 #include <emmintrin.h>
99 @@ -14380,7 +14380,9 @@
100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
101 /* end confdefs.h. */
103 +#if !defined(__EMSCRIPTEN__)
104 #include <mmintrin.h>
106 #include <xmmintrin.h>
107 #include <emmintrin.h>
108 #include <tmmintrin.h>