From 776bf2ac11e8ca1c9a900eb363687f5cb8781723 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Wed, 22 Aug 2007 19:36:00 +0200 Subject: [PATCH] Guard config.h include with HAVE_CONFIG_H ... and add -DHAVE_CONFIG_H to CPPFLAGS in config.make.in. --- config.make.in | 1 + tig.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config.make.in b/config.make.in index 1b48ff8..f863248 100644 --- a/config.make.in +++ b/config.make.in @@ -7,6 +7,7 @@ datarootdir = @datarootdir@ CC = @CC@ CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ -DHAVE_CONFIG_H LDFLAGS = @LDFLAGS@ LDLIBS = @LIBS@ diff --git a/tig.c b/tig.c index 82dbd23..6a5be7f 100644 --- a/tig.c +++ b/tig.c @@ -11,6 +11,10 @@ * GNU General Public License for more details. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #ifndef TIG_VERSION #define TIG_VERSION "unknown-version" #endif @@ -40,8 +44,6 @@ #include -#include "config.h" - #if __GNUC__ >= 3 #define __NORETURN __attribute__((__noreturn__)) #else -- 2.11.0