Browse files

Put preprocessor defines into CPPFLAGS not compile flags...

  • Loading branch information...
1 parent 1165878 commit 55aa7b17ab3df3d263f0eca14a6248fab1ceb90e @ry ry committed Sep 28, 2010
Showing with 17 additions and 17 deletions.
  1. +17 −17 wscript
View
34 wscript
@@ -169,7 +169,7 @@ def configure(conf):
args='--cflags --libs',
uselib_store='OPENSSL'):
Options.options.use_openssl = conf.env["USE_OPENSSL"] = True
- conf.env.append_value("CXXFLAGS", "-DHAVE_OPENSSL=1")
+ conf.env.append_value("CPPFLAGS", "-DHAVE_OPENSSL=1")
else:
libssl = conf.check_cc(lib='ssl',
header_name='openssl/ssl.h',
@@ -181,7 +181,7 @@ def configure(conf):
uselib_store='OPENSSL')
if libcrypto and libssl:
conf.env["USE_OPENSSL"] = Options.options.use_openssl = True
- conf.env.append_value("CXXFLAGS", "-DHAVE_OPENSSL=1")
+ conf.env.append_value("CPPFLAGS", "-DHAVE_OPENSSL=1")
else:
conf.fatal("Could not autodetect OpenSSL support. " +
"Make sure OpenSSL development packages are installed. " +
@@ -266,13 +266,11 @@ def configure(conf):
# used by platform_darwin_*.cc
conf.env.append_value('LINKFLAGS', ['-framework','Carbon'])
- conf.env.append_value("CCFLAGS", "-DX_STACKSIZE=%d" % (1024*64))
-
+ # Needed for getaddrinfo in libeio
+ conf.env.append_value("CPPFLAGS", "-DX_STACKSIZE=%d" % (1024*64))
# LFS
- conf.env.append_value('CCFLAGS', '-D_LARGEFILE_SOURCE')
- conf.env.append_value('CXXFLAGS', '-D_LARGEFILE_SOURCE')
- conf.env.append_value('CCFLAGS', '-D_FILE_OFFSET_BITS=64')
- conf.env.append_value('CXXFLAGS', '-D_FILE_OFFSET_BITS=64')
+ conf.env.append_value('CPPFLAGS', '-D_LARGEFILE_SOURCE')
+ conf.env.append_value('CPPFLAGS', '-D_FILE_OFFSET_BITS=64')
## needed for node_file.cc fdatasync
## Strangely on OSX 10.6 the g++ doesn't see fdatasync but gcc does?
@@ -286,14 +284,12 @@ def configure(conf):
}
"""
if conf.check_cxx(msg="Checking for fdatasync(2) with c++", fragment=code):
- conf.env.append_value('CXXFLAGS', '-DHAVE_FDATASYNC=1')
+ conf.env.append_value('CPPFLAGS', '-DHAVE_FDATASYNC=1')
else:
- conf.env.append_value('CXXFLAGS', '-DHAVE_FDATASYNC=0')
+ conf.env.append_value('CPPFLAGS', '-DHAVE_FDATASYNC=0')
# platform
- platform_def = '-DPLATFORM="' + conf.env['DEST_OS'] + '"'
- conf.env.append_value('CCFLAGS', platform_def)
- conf.env.append_value('CXXFLAGS', platform_def)
+ conf.env.append_value('CPPFLAGS', '-DPLATFORM="' + conf.env['DEST_OS'] + '"')
# Split off debug variant before adding variant specific defines
debug_env = conf.env.copy()
@@ -302,14 +298,18 @@ def configure(conf):
# Configure debug variant
conf.setenv('debug')
debug_env.set_variant('debug')
- debug_env.append_value('CCFLAGS', ['-DDEBUG', '-g', '-O0', '-Wall', '-Wextra'])
- debug_env.append_value('CXXFLAGS', ['-DDEBUG', '-g', '-O0', '-Wall', '-Wextra'])
+ debug_env.append_value('CPPFLAGS', '-DDEBUG')
+ debug_compile_flags = ['-g', '-O0', '-Wall', '-Wextra']
+ debug_env.append_value('CCFLAGS', debug_compile_flags)
+ debug_env.append_value('CXXFLAGS', debug_compile_flags)
conf.write_config_header("config.h")
# Configure default variant
conf.setenv('default')
- conf.env.append_value('CCFLAGS', ['-DNDEBUG', '-g', '-O3'])
- conf.env.append_value('CXXFLAGS', ['-DNDEBUG', '-g', '-O3'])
+ conf.env.append_value('CPPFLAGS', '-DNDEBUG')
+ default_compile_flags = ['-g', '-O3']
+ conf.env.append_value('CCFLAGS', default_compile_flags)
+ conf.env.append_value('CXXFLAGS', default_compile_flags)
conf.write_config_header("config.h")

0 comments on commit 55aa7b1

Please sign in to comment.