summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2013-02-20 14:40:07 +0000
committerDamien Lespiau <damien.lespiau@intel.com>2013-03-04 15:45:34 +0000
commit7ee278f17613d07ee18070f83aca9f050a526a72 (patch)
treeebbf788c54030aa6b6d155c36954d4498710197e
parentaa2bd8a6921b751d2f8a5caa0001e386f139fecc (diff)
build: Guard the inclusions of config.h with HAVE_CONFIG_H
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>
-rw-r--r--lib/intel_drm.c2
-rw-r--r--tests/gem_fence_thrash.c2
-rw-r--r--tests/kms_flip.c2
-rw-r--r--tests/testdisplay.c2
-rw-r--r--tools/intel_gpu_top.c2
5 files changed, 10 insertions, 0 deletions
diff --git a/lib/intel_drm.c b/lib/intel_drm.c
index eaf98950..4656b499 100644
--- a/lib/intel_drm.c
+++ b/lib/intel_drm.c
@@ -26,7 +26,9 @@
*
*/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <unistd.h>
#include <stdlib.h>
diff --git a/tests/gem_fence_thrash.c b/tests/gem_fence_thrash.c
index 3d50e334..c9e847b7 100644
--- a/tests/gem_fence_thrash.c
+++ b/tests/gem_fence_thrash.c
@@ -26,7 +26,9 @@
*
*/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <unistd.h>
#include <stdlib.h>
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index c2a29aea..1de61542 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -21,7 +21,9 @@
* IN THE SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <assert.h>
#include <cairo.h>
diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index 4d29ddbc..251141fa 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -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>
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index 76a2b0bb..c8b506a8 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -27,7 +27,9 @@
*
*/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <unistd.h>
#include <stdlib.h>