From: Jonas Fonseca Date: Wed, 22 Aug 2007 17:36:00 +0000 (+0200) Subject: Guard config.h include with HAVE_CONFIG_H X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=776bf2ac11e8ca1c9a900eb363687f5cb8781723;p=tig.git Guard config.h include with HAVE_CONFIG_H ... and add -DHAVE_CONFIG_H to CPPFLAGS in config.make.in. --- 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