summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2014-02-04 14:25:50 -0500
committerGaetan Nadon <memsize@videotron.ca>2014-02-05 19:14:15 -0500
commite6d77fc323ad09174fcbe73a1a646cc968a19fb6 (patch)
tree54527d6df566530cfa30549df8810557281a3c02
parentff1c7f70001ffc04843a003fb058ac44a9a8c5d5 (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>
-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 *