Fixed bug 4103 - SDL_cpuinfo.h provokes warnings with -Wundef on non-x86 hosts Felix Geyer Forwarding from https://bugs.debian.org/892087 quoting verbatim: The SDL2 header SDL_cpuinfo.h generates gcc warnings if the program using it compiles with the -Wundef warning. (In particular, this means that QEMU builds using it fail on at least sparc hosts, since QEMU dev builds use both -Wundef and -Werror.). /usr/include/SDL2/SDL_cpuinfo.h:63:5: warning: "HAVE_IMMINTRIN_H" is not defined, evaluates to 0 [-Wundef] #if HAVE_IMMINTRIN_H && !defined(SDL_DISABLE_IMMINTRIN_H)
diff --git a/include/SDL_cpuinfo.h b/include/SDL_cpuinfo.h
index 0812705..74d9fdf 100644
--- a/include/SDL_cpuinfo.h
+++ b/include/SDL_cpuinfo.h
@@ -51,7 +51,7 @@
#include <intrin.h>
#else
#ifdef __ALTIVEC__
-#if HAVE_ALTIVEC_H && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H)
+#if defined(HAVE_ALTIVEC_H) && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H)
#include <altivec.h>
#undef pixel
#undef bool
@@ -60,7 +60,7 @@
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
#include <mm3dnow.h>
#endif
-#if HAVE_IMMINTRIN_H && !defined(SDL_DISABLE_IMMINTRIN_H)
+#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)
#include <immintrin.h>
#else
#if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)