[Xcb] [PATCH util-renderutil 3/9] config: use AC_CONFIG_HEADERS to create a config.h file
Gaetan Nadon
memsize at videotron.ca
Thu Feb 6 23:30:05 CET 2014
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 at videotron.ca>
---
configure.ac | 1 +
renderutil/glyph.c | 4 ++++
renderutil/util.c | 4 ++++
3 files changed, 9 insertions(+)
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 *
--
1.7.9.5
More information about the Xcb
mailing list