From fa70bfeff5b1fab6433685eb003792748705a3a6 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Sat, 24 Oct 2015 09:56:07 +0200 Subject: [PATCH] build:wafsamba: dead code removal in gettext detection The values conf.env.CFLAGS and conf.env.LDFLAGS have no effect in waf 1.5 Additionally, values must be appended using: conf.env.append_value('CCFLAGS', value) Keep in mind that conf.env.CCFLAGS returns an empty list when not undefined, which means that extending that list will have no effect at all. Signed-off-by: Thomas Nagy Reviewed-by: Reviewed-by: --- lib/replace/wscript | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/replace/wscript b/lib/replace/wscript index 0be52f7..c3f94e5 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -362,12 +362,9 @@ removeea setea conf.env.intl_libs='' if not Options.options.disable_gettext: # any extra path given to look at? - if not Options.options.gettext_location == 'None': - conf.env['CFLAGS'].extend(["-I%s" % Options.options.gettext_location]); - conf.env['LDFLAGS'].extend(["-L%s" % Options.options.gettext_location]); - else: - conf.env['CFLAGS'].extend(["-I/usr/local"]); - conf.env['LDFLAGS'].extend(["-L/usr/local"]); + if Options.options.gettext_location: + conf.env.append_value('CCFLAGS', "-I%s" % Options.options.gettext_location) + conf.env.append_value('LINKFLAGS', "-L%s" % Options.options.gettext_location) conf.CHECK_HEADERS('libintl.h') conf.CHECK_LIB('intl') conf.CHECK_DECLS('dgettext gettext bindtextdomain textdomain bind_textdomain_codeset', headers="libintl.h")