From mboxrd@z Thu Jan 1 00:00:00 1970 From: Damien Lespiau Subject: [PATCH 4/4] build: Guard the inclusions of config.h with HAVE_CONFIG_H Date: Wed, 20 Feb 2013 14:53:16 +0000 Message-ID: <1361371996-28166-4-git-send-email-damien.lespiau@intel.com> References: <1361371996-28166-1-git-send-email-damien.lespiau@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 798C5E67B3 for ; Wed, 20 Feb 2013 06:53:22 -0800 (PST) In-Reply-To: <1361371996-28166-1-git-send-email-damien.lespiau@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org 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 --- lib/intel_drm.c | 2 ++ tests/gem_fence_thrash.c | 2 ++ tests/kms_flip.c | 2 ++ tests/testdisplay.c | 2 ++ tools/intel_gpu_top.c | 2 ++ 5 files changed, 10 insertions(+), 0 deletions(-) diff --git a/lib/intel_drm.c b/lib/intel_drm.c index eaf9895..4656b49 100644 --- a/lib/intel_drm.c +++ b/lib/intel_drm.c @@ -26,7 +26,9 @@ * */ +#ifdef HAVE_CONFIG_H #include "config.h" +#endif #include #include diff --git a/tests/gem_fence_thrash.c b/tests/gem_fence_thrash.c index 3d50e33..c9e847b 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 #include diff --git a/tests/kms_flip.c b/tests/kms_flip.c index c2a29ae..1de6154 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 #include diff --git a/tests/testdisplay.c b/tests/testdisplay.c index 4d29ddb..251141f 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 #include diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c index 76a2b0b..c8b506a 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 #include -- 1.7.7.5