From 3aff478b3a14ba6eb033162641bd9045c5ac2db5 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Thu, 4 Nov 2010 20:33:45 +0000 Subject: [PATCH] Add the c++ definition HAVE_CONFIG_H in the scons build and check it before including config.h so the cmake build system doesn't need to worry about conflicts from that file if it exists. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6342 8ced0084-cf51-0410-be5f-012b33b47a6e --- Externals/WiiUse/Src/wiiuse.h | 4 +++- SConstruct | 2 +- Source/Core/Common/Src/Common.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Externals/WiiUse/Src/wiiuse.h b/Externals/WiiUse/Src/wiiuse.h index 70e453e32b..21d820bb2f 100644 --- a/Externals/WiiUse/Src/wiiuse.h +++ b/Externals/WiiUse/Src/wiiuse.h @@ -48,7 +48,9 @@ #include #include #elif defined(__linux__) - #include "config.h" + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif #if HAVE_BLUEZ #include #endif diff --git a/SConstruct b/SConstruct index 7e987f1da3..83f56736e8 100644 --- a/SConstruct +++ b/SConstruct @@ -94,7 +94,7 @@ if env['CCVERSION'] < '4.2.0': if env['CCVERSION'] >= '4.3.0': env['CCFLAGS'] += ['-Wno-array-bounds', '-Wno-unused-result'] -env['CPPDEFINES'] = [] +env['CPPDEFINES'] = ['HAVE_CONFIG_H'] if env['flavor'] == 'debug': env['CPPDEFINES'] += ['_DEBUG'] elif env['flavor'] == 'fastlog': diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h index 8fc58c8248..842230ed66 100644 --- a/Source/Core/Common/Src/Common.h +++ b/Source/Core/Common/Src/Common.h @@ -108,7 +108,7 @@ extern const char *netplay_dolphin_ver; //CrtDebugBreak breakAt(614); #endif // end DEBUG/FAST -#else +#elif defined HAVE_CONFIG_H #include "config.h" // SCons autoconfiguration defines #endif