From 296ac5b16359f59e01cbb7662daf245a23c3fc72 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Mon, 30 Aug 2010 15:02:26 +0200 Subject: [PATCH] Disable gccdeps if -MD is not supported --- buildtools/wafsamba/wscript | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index 5a3b9c5fd4b..788c25a6dca 100644 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -82,7 +82,7 @@ def set_options(opt): action="store_true", dest='fatal_errors', default=False) gr.add_option('--enable-gccdeps', help=("Enable use of gcc -MD dependency module"), - action="store_true", dest='enable_gccdeps', default=False) + action="store_true", dest='enable_gccdeps', default=True) gr.add_option('--timestamp-dependencies', help=("use file timestamps instead of content for build dependencies (BROKEN)"), action="store_true", dest='timestamp_dependencies', default=False) @@ -162,7 +162,12 @@ def configure(conf): if Options.options.enable_gccdeps: # don't enable gccdeps by default as it needs a very recent version gcc - conf.check_tool('gccdeps', tooldir=conf.srcdir + "/buildtools/wafsamba") + try: + conf.check(fragment='int main() {return 0;}\n', ccflags=['-MD'], mandatory=True, msg='Check for -MD') + except: + pass + else: + conf.check_tool('gccdeps', tooldir=conf.srcdir + "/buildtools/wafsamba") # make the install paths available in environment conf.env.LIBDIR = Options.options.LIBDIR or '${PREFIX}/lib' -- 2.11.4.GIT