diff options
author | Gaetan Nadon <memsize@videotron.ca> | 2014-02-09 10:41:18 -0500 |
---|---|---|
committer | Arnaud Fontaine <arnau@debian.org> | 2014-02-17 17:48:51 +0900 |
commit | 95e997ca45fc1c4235eea7a211c6ab2fa5e489f8 (patch) | |
tree | 1baf943bea6639d44b7eddb554b0429d59e0fdf7 | |
parent | 80ce6834e2374711eba834386643a354565a84f2 (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.
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Reviewed-by: Arnaud Fontaine <arnau@debian.org>
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | src/atoms.c | 5 | ||||
-rw-r--r-- | src/event.c | 4 | ||||
-rw-r--r-- | src/xcb_aux.c | 4 |
4 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 7693872..5e66d01 100644 --- a/configure.ac +++ b/configure.ac @@ -3,6 +3,7 @@ AC_INIT([xcb-util],[0.3.9], [https://bugs.freedesktop.org/enter_bug.cgi?product=xcb&component=Utils], [xcb-util]) AC_CONFIG_SRCDIR([Makefile.am]) +AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) diff --git a/src/atoms.c b/src/atoms.c index e9133a6..e5c33e5 100644 --- a/src/atoms.c +++ b/src/atoms.c @@ -1,3 +1,8 @@ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + /* Rely on vasprintf (GNU extension) instead of vsnprintf if possible... */ #define _GNU_SOURCE diff --git a/src/event.c b/src/event.c index de8899a..b868252 100644 --- a/src/event.c +++ b/src/event.c @@ -26,6 +26,10 @@ * prior written authorization from the authors. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <assert.h> #include <stdlib.h> #include <string.h> diff --git a/src/xcb_aux.c b/src/xcb_aux.c index 4efb5cb..b6f64f8 100644 --- a/src/xcb_aux.c +++ b/src/xcb_aux.c @@ -29,6 +29,10 @@ * prior written authorization from the authors. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <stdio.h> #include <stdlib.h> #include <string.h> |