test/testrumble.c
changeset 6771 55337ff4256f
parent 5535 96594ac5fd1a
child 7437 964e8876ad3b
--- a/test/testrumble.c	Sat Dec 22 20:13:25 2012 -0800
+++ b/test/testrumble.c	Sat Dec 22 20:43:51 2012 -0800
@@ -26,13 +26,15 @@
  * includes
  */
 #include <stdlib.h>
-#include "SDL.h"
-#include "SDL_haptic.h"
-
 #include <stdio.h>              /* printf */
 #include <string.h>             /* strstr */
 #include <ctype.h>              /* isdigit */
 
+#include "SDL.h"
+
+#ifndef SDL_HAPTIC_DISABLED
+
+#include "SDL_haptic.h"
 
 static SDL_Haptic *haptic;
 
@@ -142,3 +144,13 @@
     return 0;
 }
 
+#else
+
+int
+main(int argc, char *argv[])
+{
+    fprintf(stderr, "SDL compiled without Haptic support.\n");
+    exit(1);
+}
+
+#endif