summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2014-02-04 14:25:50 -0500
committerArnaud Fontaine <arnau@debian.org>2014-02-17 17:38:36 +0900
commitb7135cab6d3a5eb391fb7d381a74b1ee470c7eea (patch)
tree54527d6df566530cfa30549df8810557281a3c02
parent38d6ba170d0e174871e56fad2762055cfc0189cc (diff)
config: use AC_CONFIG_HEADERS to create a config.h file
This file contains C preprocessor #define statements which replace the current -Ds added to each compilation invocation. This makes the gcc output command easier to read and prevents exceeding the max line limits on some computers. This is the preferred method in al the xorg modules. Note that cache.c already had #include config.h" which was incorrect and misleading. Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Arnaud Fontaine <arnau@debian.org>
-rw-r--r--configure.ac1
-rw-r--r--renderutil/glyph.c4
-rw-r--r--renderutil/util.c4
3 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 6dea1c9..555a8b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,6 +3,7 @@ AC_INIT([xcb-util-renderutil],[0.3.8],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xcb&component=Utils],
[xcb-util-renderutil])
AC_CONFIG_SRCDIR([Makefile.am])
+AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
diff --git a/renderutil/glyph.c b/renderutil/glyph.c
index 4996202..d19fba6 100644
--- a/renderutil/glyph.c
+++ b/renderutil/glyph.c
@@ -23,6 +23,10 @@
* authorization from the authors.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdlib.h>
#include <string.h>
diff --git a/renderutil/util.c b/renderutil/util.c
index b4252ed..7666c43 100644
--- a/renderutil/util.c
+++ b/renderutil/util.c
@@ -19,6 +19,10 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "xcb_renderutil.h"
xcb_render_pictvisual_t *