test: Do not include config.h unless HAVE_CONFIG_H is defined
authorAndrea Canciani <ranma42@gmail.com>
Sun, 4 Sep 2011 20:52:53 +0000 (13:52 -0700)
committerAndrea Canciani <ranma42@gmail.com>
Wed, 14 Sep 2011 14:03:35 +0000 (07:03 -0700)
The win32 build system does not generate config.h and correctly runs
the compiler without defining HAVE_CONFIG_H. Nevertheless some files
include config.h without checking for its availability, breaking the
build from a clean directory:

test\utils.h(2) : fatal error C1083: Cannot open include file:
'config.h': No such file or directory
...

test/blitters-test.c
test/composite.c
test/fetch-test.c
test/pdf-op-test.c
test/scaling-helpers-test.c
test/utils.h

index 594ec54..790a27f 100644 (file)
@@ -8,7 +8,6 @@
 #include <assert.h>
 #include <stdlib.h>
 #include <stdio.h>
-#include <config.h>
 #include "utils.h"
 
 static pixman_indexed_t rgb_palette[9];
index edea9a9..408c363 100644 (file)
@@ -27,7 +27,6 @@
 #include <stdio.h>
 #include <stdlib.h> /* abort() */
 #include <math.h>
-#include <config.h>
 #include <time.h>
 #include "utils.h"
 
index feb98d9..9f80eec 100644 (file)
@@ -1,8 +1,11 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <assert.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include "pixman.h"
-#include <config.h>
 
 #define SIZE 1024
 
index dc7a4fd..99cb7df 100644 (file)
@@ -1,4 +1,3 @@
-#include <config.h>
 #include <stdlib.h>
 #include "utils.h"
 
index eb436d1..a8b94b0 100644 (file)
@@ -1,4 +1,3 @@
-#include <config.h>
 #include <stdint.h>
 #include <stdlib.h>
 #include <stdio.h>
index 3790483..b23925c 100644 (file)
@@ -1,5 +1,8 @@
-#include <stdlib.h>
+#ifdef HAVE_CONFIG_H
 #include <config.h>
+#endif
+
+#include <stdlib.h>
 #include <assert.h>
 #include "pixman-private.h" /* For 'inline' definition */