From bff935b814355b8b75b422857c56aced0a6b1388 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sun, 10 Jun 2012 17:48:15 +0200 Subject: wafsamba: try to fix the build on AIX with xlc_r bld.env['CPP'] can be 'None' or '[]', bld.CONFIG_SET("CPP") should return False File "./buildtools/wafsamba/samba_pidl.py", line 131, in SAMBA_PIDL_LIST bld.SAMBA_PIDL(name, p, options=options, output_dir=output_dir, symlink=symlink, generate_tables=generate_tables) File "./buildtools/wafsamba/samba_pidl.py", line 65, in SAMBA_PIDL cpp = 'CPP="%s"' % bld.CONFIG_GET("CPP")[0] IndexError: list index out of range metze Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Sun Jun 10 20:18:49 CEST 2012 on sn-devel-104 --- buildtools/wafsamba/samba_autoconf.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'buildtools') diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py index 4da5df86a0..be5e9267dd 100644 --- a/buildtools/wafsamba/samba_autoconf.py +++ b/buildtools/wafsamba/samba_autoconf.py @@ -467,7 +467,16 @@ def CONFIG_GET(conf, option): @conf def CONFIG_SET(conf, option): '''return True if a configuration option was found''' - return (option in conf.env) and (conf.env[option] != ()) + if option not in conf.env: + return False + v = conf.env[option] + if v == None: + return False + if v == []: + return False + if v == (): + return False + return True Build.BuildContext.CONFIG_SET = CONFIG_SET Build.BuildContext.CONFIG_GET = CONFIG_GET -- cgit