wafsamba: try to fix the build on AIX with xlc_r
authorStefan Metzmacher <metze@samba.org>
Sun, 10 Jun 2012 15:48:15 +0000 (17:48 +0200)
committerStefan Metzmacher <metze@samba.org>
Sun, 10 Jun 2012 18:18:49 +0000 (20:18 +0200)
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 <metze@samba.org>
Autobuild-Date(master): Sun Jun 10 20:18:49 CEST 2012 on sn-devel-104

buildtools/wafsamba/samba_autoconf.py

index 4da5df86a07f3bc668241ffcd8339b9e8be837dd..be5e9267ddfee804e00327138add81f5e98c1770 100644 (file)
@@ -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