build: Guard the inclusions of config.h with HAVE_CONFIG_H
authorDamien Lespiau <damien.lespiau@intel.com>
Wed, 20 Feb 2013 14:40:07 +0000 (14:40 +0000)
committerDamien Lespiau <damien.lespiau@intel.com>
Mon, 4 Mar 2013 15:45:34 +0000 (15:45 +0000)
autoconf can be configured to not generate a config.h but to give the
defines with command line arguments instead. In this case, there's no
config.h to include.

To work in both cases autoconf adds a HAVE_CONFIG_H define on the command
line to signal there's a config.h to include.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
lib/intel_drm.c
tests/gem_fence_thrash.c
tests/kms_flip.c
tests/testdisplay.c
tools/intel_gpu_top.c

index eaf9895..4656b49 100644 (file)
@@ -26,7 +26,9 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #include <unistd.h>
 #include <stdlib.h>
index 3d50e33..c9e847b 100644 (file)
@@ -26,7 +26,9 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #include <unistd.h>
 #include <stdlib.h>
index c2a29ae..1de6154 100644 (file)
@@ -21,7 +21,9 @@
  * IN THE SOFTWARE.
  */
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #include <assert.h>
 #include <cairo.h>
index 4d29ddb..251141f 100644 (file)
@@ -45,7 +45,9 @@
  *  - DP commands (e.g. poweroff)
  * - verify outputs against VBT/physical connectors
  */
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #include <assert.h>
 #include <cairo.h>
index 76a2b0b..c8b506a 100644 (file)
@@ -27,7 +27,9 @@
  *
  */
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #include <unistd.h>
 #include <stdlib.h>