build-sys: include config.h to all files using automake

Do not try to be too smart which compilations need config.h, as most of
them will simply because of the config.h has information about system
capabilities.
This commit is contained in:
Sami Kerola 2013-02-12 22:05:45 +00:00
parent f5bfd27f52
commit 73b7958770
41 changed files with 7 additions and 149 deletions

View file

@ -37,10 +37,6 @@
#include "FbTk/I18n.hh" #include "FbTk/I18n.hh"
#include "FbTk/FbTime.hh" #include "FbTk/FbTime.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#ifdef HAVE_CTIME #ifdef HAVE_CTIME
#include <ctime> #include <ctime>
#else #else

View file

@ -39,10 +39,6 @@
#include "FbTk/Util.hh" #include "FbTk/Util.hh"
#include "FbTk/RelCalcHelper.hh" #include "FbTk/RelCalcHelper.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#ifdef HAVE_CSTDLIB #ifdef HAVE_CSTDLIB
#include <cstdlib> #include <cstdlib>
#else #else

View file

@ -1,7 +1,6 @@
#ifndef DEBUG_HH #ifndef DEBUG_HH
#define DEBUG_HH #define DEBUG_HH
#include "config.h"
#include <iostream> #include <iostream>
#ifdef DEBUG #ifdef DEBUG

View file

@ -54,11 +54,6 @@
#include <string.h> #include <string.h>
#endif #endif
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#if defined(__EMX__) && defined(HAVE_PROCESS_H) #if defined(__EMX__) && defined(HAVE_PROCESS_H)
#include <process.h> // for P_NOWAIT #include <process.h> // for P_NOWAIT
#endif // __EMX__ #endif // __EMX__

View file

@ -25,7 +25,6 @@
#include <string> #include <string>
#include "config.h"
#ifdef HAVE_ICONV #ifdef HAVE_ICONV
#include <iconv.h> #include <iconv.h>
#endif // HAVE_ICONV #endif // HAVE_ICONV

View file

@ -22,12 +22,6 @@
#ifndef FBTK_FBTIME_HH #ifndef FBTK_FBTIME_HH
#define FBTK_FBTIME_HH #define FBTK_FBTIME_HH
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#ifdef HAVE_INTTYPES_H #ifdef HAVE_INTTYPES_H
#include <inttypes.h> #include <inttypes.h>
#endif // HAVE_INTTYPES_H #endif // HAVE_INTTYPES_H

View file

@ -28,10 +28,6 @@
#include "App.hh" #include "App.hh"
#include "Transparent.hh" #include "Transparent.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#include <X11/Xutil.h> #include <X11/Xutil.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>

View file

@ -22,9 +22,6 @@
#ifndef FBTK_FILEUTIL_HH #ifndef FBTK_FILEUTIL_HH
#define FBTK_FILEUTIL_HH #define FBTK_FILEUTIL_HH
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#ifdef HAVE_CTIME #ifdef HAVE_CTIME
#include <ctime> #include <ctime>
#else #else

View file

@ -25,10 +25,6 @@
#include "FontImp.hh" #include "FontImp.hh"
#include "App.hh" #include "App.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
// for antialias // for antialias
#ifdef USE_XFT #ifdef USE_XFT
#include "XftFontImp.hh" #include "XftFontImp.hh"

View file

@ -24,10 +24,6 @@
#include <X11/Xlib.h> #include <X11/Xlib.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#include "FbString.hh" #include "FbString.hh"
#include "Color.hh" #include "Color.hh"
#include "Orientation.hh" #include "Orientation.hh"

View file

@ -30,11 +30,6 @@
#include "FbString.hh" #include "FbString.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#ifdef HAVE_LOCALE_H #ifdef HAVE_LOCALE_H
#include <locale.h> #include <locale.h>
#endif // HAVE_LOCALE_H #endif // HAVE_LOCALE_H

View file

@ -23,10 +23,6 @@
#include "StringUtil.hh" #include "StringUtil.hh"
#include "FileUtil.hh" #include "FileUtil.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#ifdef HAVE_XPM #ifdef HAVE_XPM
#include "ImageXPM.hh" #include "ImageXPM.hh"
#endif // HAVE_XPM #endif // HAVE_XPM

View file

@ -35,11 +35,6 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#endif // _GNU_SOURCE #endif // _GNU_SOURCE
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#ifdef HAVE_SYS_TYPES_H #ifdef HAVE_SYS_TYPES_H
#include <sys/types.h> #include <sys/types.h>
#endif // HAVE_SYS_TYPES_H #endif // HAVE_SYS_TYPES_H

View file

@ -1,6 +1,6 @@
noinst_LIBRARIES = libFbTk.a noinst_LIBRARIES = libFbTk.a
AM_CPPFLAGS=@CPPFLAGS@ AM_CPPFLAGS=-include $(top_builddir)/config.h
if XFT if XFT
xft_SOURCE= XftFontImp.hh XftFontImp.cc xft_SOURCE= XftFontImp.hh XftFontImp.cc

View file

@ -29,10 +29,6 @@
#include "Menu.hh" #include "Menu.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif //HAVE_CONFIG_H
#include "MenuItem.hh" #include "MenuItem.hh"
#include "MenuSeparator.hh" #include "MenuSeparator.hh"
#include "ImageControl.hh" #include "ImageControl.hh"

View file

@ -26,10 +26,6 @@
#include "NotCopyable.hh" #include "NotCopyable.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#include <string> #include <string>
/* /*

View file

@ -26,10 +26,6 @@
#include "GContext.hh" #include "GContext.hh"
#include "FbPixmap.hh" #include "FbPixmap.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#ifdef HAVE_CSTRING #ifdef HAVE_CSTRING
#include <cstring> #include <cstring>
#else #else

View file

@ -24,10 +24,6 @@
#ifndef THEMEITEMS_HH #ifndef THEMEITEMS_HH
#define THEMEITEMS_HH #define THEMEITEMS_HH
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#include "Theme.hh" #include "Theme.hh"
#include "Color.hh" #include "Color.hh"
#include "Texture.hh" #include "Texture.hh"

View file

@ -29,10 +29,6 @@
#include "Command.hh" #include "Command.hh"
#include "FbTime.hh" #include "FbTime.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif //HAVE_CONFIG_H
#include <string> #include <string>
namespace FbTk { namespace FbTk {

View file

@ -23,10 +23,6 @@
#include "App.hh" #include "App.hh"
#include "I18n.hh" #include "I18n.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#ifdef HAVE_XRENDER #ifdef HAVE_XRENDER
#include <X11/extensions/Xrender.h> #include <X11/extensions/Xrender.h>
#endif // HAVE_XRENDER #endif // HAVE_XRENDER

View file

@ -25,10 +25,6 @@
#include <math.h> #include <math.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif //HAVE_CONFIG_H
namespace FbTk { namespace FbTk {
XftFontImp::XftFontImp(const char *name, bool utf8): XftFontImp::XftFontImp(const char *name, bool utf8):

View file

@ -27,10 +27,6 @@
#include "FbPixmap.hh" #include "FbPixmap.hh"
#include "GContext.hh" #include "GContext.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif //HAVE_CONFIG_H
#ifdef HAVE_SETLOCALE #ifdef HAVE_SETLOCALE
#include <locale.h> #include <locale.h>
#endif // HAVE_SETLOCALE #endif // HAVE_SETLOCALE

View file

@ -22,10 +22,6 @@
#ifndef FBTK_STRINGSTREAM_HH #ifndef FBTK_STRINGSTREAM_HH
#define FBTK_STRINGSTREAM_HH #define FBTK_STRINGSTREAM_HH
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#ifdef HAVE_SSTREAM #ifdef HAVE_SSTREAM
#include <sstream> #include <sstream>
#define FbTk_istringstream std::istringstream #define FbTk_istringstream std::istringstream

View file

@ -32,10 +32,6 @@
#include "FbTk/ImageControl.hh" #include "FbTk/ImageControl.hh"
#include "FbTk/TextUtils.hh" #include "FbTk/TextUtils.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#include <X11/Xutil.h> #include <X11/Xutil.h>
#ifdef SHAPE #ifdef SHAPE
#include <X11/extensions/shape.h> #include <X11/extensions/shape.h>

View file

@ -40,11 +40,6 @@
#include "FbTk/AutoReloadHelper.hh" #include "FbTk/AutoReloadHelper.hh"
#include "FbTk/STLUtil.hh" #include "FbTk/STLUtil.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#ifdef HAVE_CCTYPE #ifdef HAVE_CCTYPE
#include <cctype> #include <cctype>
#else #else

View file

@ -38,7 +38,7 @@ DEFAULT_WINDOWMENU=@DEFAULT_WINDOWMENU@
PROGRAM_PREFIX=@program_prefix@ PROGRAM_PREFIX=@program_prefix@
PROGRAM_SUFFIX=@program_suffix@ PROGRAM_SUFFIX=@program_suffix@
AM_CPPFLAGS= AM_CPPFLAGS=-include $(top_builddir)/config.h
bin_PROGRAMS= fluxbox bin_PROGRAMS= fluxbox
BUILT_SOURCES = defaults.hh defaults.cc BUILT_SOURCES = defaults.hh defaults.cc

View file

@ -82,10 +82,6 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#endif // _GNU_SOURCE #endif // _GNU_SOURCE
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#ifdef USE_SLIT #ifdef USE_SLIT
#include "Slit.hh" #include "Slit.hh"
#include "SlitClient.hh" #include "SlitClient.hh"

View file

@ -29,10 +29,6 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#endif // _GNU_SOURCE #endif // _GNU_SOURCE
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#include "Screen.hh" #include "Screen.hh"
#include "ScreenPlacement.hh" #include "ScreenPlacement.hh"
#include "FbTk/ImageControl.hh" #include "FbTk/ImageControl.hh"

View file

@ -60,10 +60,6 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#endif // _GNU_SOURCE #endif // _GNU_SOURCE
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#include <X11/Xutil.h> #include <X11/Xutil.h>
#include <X11/keysym.h> #include <X11/keysym.h>

View file

@ -55,9 +55,6 @@
#include "FbTk/Select2nd.hh" #include "FbTk/Select2nd.hh"
#include "FbTk/MemFun.hh" #include "FbTk/MemFun.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#ifdef SHAPE #ifdef SHAPE
#include <X11/extensions/shape.h> #include <X11/extensions/shape.h>
#endif // SHAPE #endif // SHAPE

View file

@ -23,10 +23,6 @@
#include "FbTk/StringUtil.hh" #include "FbTk/StringUtil.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#ifdef HAVE_CSTDLIB #ifdef HAVE_CSTDLIB
#include <cstdlib> #include <cstdlib>
#else #else

View file

@ -41,10 +41,6 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#endif // _GNU_SOURCE #endif // _GNU_SOURCE
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>

View file

@ -62,10 +62,6 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#endif // _GNU_SOURCE #endif // _GNU_SOURCE
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#ifdef USE_EWMH #ifdef USE_EWMH
#include "Ewmh.hh" #include "Ewmh.hh"
#endif // USE_EWMH #endif // USE_EWMH

View file

@ -41,10 +41,6 @@
#include <stdio.h> #include <stdio.h>
#endif #endif
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#ifdef TIME_WITH_SYS_TIME #ifdef TIME_WITH_SYS_TIME
#include <sys/time.h> #include <sys/time.h>
#include <time.h> #include <time.h>

View file

@ -20,10 +20,6 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#include "fluxbox.hh" #include "fluxbox.hh"
#include "version.h" #include "version.h"
#include "defaults.hh" #include "defaults.hh"

View file

@ -1,4 +1,4 @@
AM_CPPFLAGS= -I$(top_srcdir)/src AM_CPPFLAGS= -I$(top_srcdir)/src -include $(top_builddir)/config.h
noinst_PROGRAMS= \ noinst_PROGRAMS= \
testTexture \ testTexture \

View file

@ -1,6 +1,6 @@
# util/Makefile.am for Fluxbox # util/Makefile.am for Fluxbox
SUBDIRS= fbrun SUBDIRS= fbrun
AM_CPPFLAGS= -I$(top_srcdir)/src -I$(top_srcdir)/src/FbTk AM_CPPFLAGS= -I$(top_srcdir)/src -I$(top_srcdir)/src/FbTk -include $(top_builddir)/config.h
bin_SCRIPTS= fbsetbg fluxbox-generate_menu startfluxbox bin_SCRIPTS= fbsetbg fluxbox-generate_menu startfluxbox
bin_PROGRAMS= fbsetroot fluxbox-update_configs fluxbox-remote bin_PROGRAMS= fbsetroot fluxbox-update_configs fluxbox-remote
fbsetroot_SOURCES= fbsetroot.cc fbsetroot.hh fbsetroot_SOURCES= fbsetroot.cc fbsetroot.hh
@ -23,10 +23,10 @@ all-local: startfluxbox
clean-local: clean-local:
rm -f startfluxbox fluxbox-generate_menu rm -f startfluxbox fluxbox-generate_menu
fbsetroot.o: fbsetroot.cc ../config.h $(srcdir)/fbsetroot.hh \ fbsetroot.o: fbsetroot.cc $(srcdir)/fbsetroot.hh \
$(top_srcdir)/src/FbRootWindow.hh $(top_srcdir)/src/FbAtoms.hh $(top_srcdir)/src/FbRootWindow.hh $(top_srcdir)/src/FbAtoms.hh
fluxbox-update_configs.o: fluxbox-update_configs.cc ../config.h \ fluxbox-update_configs.o: fluxbox-update_configs.cc \
$(top_builddir)/src/defaults.hh $(top_builddir)/src/defaults.hh
fluxbox-remote.o: fluxbox-remote.cc fluxbox-remote.o: fluxbox-remote.cc

View file

@ -27,10 +27,6 @@
#include "FbTk/KeyUtil.hh" #include "FbTk/KeyUtil.hh"
#include "FbTk/FileUtil.hh" #include "FbTk/FileUtil.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#ifdef HAVE_XPM #ifdef HAVE_XPM
#include <X11/xpm.h> #include <X11/xpm.h>
#include "fbrun.xpm" #include "fbrun.xpm"

View file

@ -1,5 +1,5 @@
FLUXBOX_SRC_DIR= ../../src/ FLUXBOX_SRC_DIR= ../../src/
AM_CPPFLAGS= -I$(top_srcdir)/src -I$(top_srcdir)/src/FbTk AM_CPPFLAGS= -I$(top_srcdir)/src -I$(top_srcdir)/src/FbTk -include $(top_builddir)/config.h
bin_PROGRAMS= fbrun bin_PROGRAMS= fbrun
fbrun_SOURCES= FbRun.hh FbRun.cc main.cc fbrun.xpm fbrun_SOURCES= FbRun.hh FbRun.cc main.cc fbrun.xpm
fbrun_LDADD= ${FLUXBOX_SRC_DIR}FbTk/libFbTk.a fbrun_LDADD= ${FLUXBOX_SRC_DIR}FbTk/libFbTk.a

View file

@ -26,10 +26,6 @@
#include "../src/FbTk/GContext.hh" #include "../src/FbTk/GContext.hh"
#include "../src/FbRootWindow.hh" #include "../src/FbRootWindow.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#include <X11/Xatom.h> #include <X11/Xatom.h>
#ifdef HAVE_CSTRING #ifdef HAVE_CSTRING

View file

@ -26,10 +26,6 @@
#include "../src/defaults.hh" #include "../src/defaults.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif // HAVE_CONFIG_H
#ifdef HAVE_SIGNAL_H #ifdef HAVE_SIGNAL_H
#include <signal.h> #include <signal.h>
#endif // HAVE_SIGNAL_H #endif // HAVE_SIGNAL_H