wafsamba: Use convenience function to find out if bundling is necessary.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 19 Jun 2010 12:02:18 +0000 (14:02 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 19 Jun 2010 12:02:18 +0000 (14:02 +0200)
buildtools/wafsamba/samba_bundled.py

index caf5361ac658414c10ccec6452b8b7f10572ccdd..c8d49672e2e16ebd613ffab1b0c6e71c5ed0ba53 100644 (file)
@@ -107,7 +107,7 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
         for syslib in TO_LIST(onlyif):
             f = 'FOUND_SYSTEMLIB_%s' % syslib
             if not f in conf.env:
-                if 'NONE' in conf.env.BUNDLED_LIBS or '!'+libname in conf.env.BUNDLED_LIBS:
+                if not conf.LIB_MAY_BE_BUNDLED(libname):
                     Logs.error('ERROR: Use of system library %s depends on missing system library %s' % (libname, syslib))
                     sys.exit(1)
                 conf.env[found] = False
@@ -134,7 +134,7 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
                 conf.SET_SYSLIB_DEPS(libname, implied_deps)
             return True
     conf.env[found] = False
-    if conf.LIB_MAY_BE_BUNDLED(libname):
+    if not conf.LIB_MAY_BE_BUNDLED(libname):
         Logs.error('ERROR: System library %s of version %s not found, and bundling disabled' % (libname, minversion))
         sys.exit(1)
     return False