Transition to waf 1.8: wrapped conf.check_cfg
authorThomas Nagy <tnagy2pow10@gmail.com>
Sat, 7 Mar 2015 14:31:19 +0000 (15:31 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 16 Mar 2015 02:00:07 +0000 (03:00 +0100)
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
(forward ported to current master by abartlet)

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
buildtools/wafsamba/samba_autoconf.py
buildtools/wafsamba/wscript
source3/wscript
source3/wscript_configure_system_ncurses
source4/lib/tls/wscript
wscript
wscript_configure_system_mitkrb5

index 905adc7..4f646fd 100644 (file)
@@ -846,3 +846,7 @@ def SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS(conf):
     if not sys.platform.startswith("openbsd") and conf.env.undefined_ignore_ldflags == []:
         if conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup']):
             conf.env.undefined_ignore_ldflags = ['-undefined', 'dynamic_lookup']
+
+@conf
+def CHECK_CFG(self, *k, **kw):
+    return self.check_cfg(*k, **kw)
index 8027c00..3180543 100755 (executable)
@@ -383,7 +383,7 @@ def configure(conf):
     conf.CHECK_INLINE()
 
     # check for pkgconfig
-    conf.check_cfg(atleast_pkgconfig_version='0.0.0')
+    conf.CHECK_CFG(atleast_pkgconfig_version='0.0.0')
 
     conf.DEFINE('_GNU_SOURCE', 1, add_to_cflags=True)
     conf.DEFINE('_XOPEN_SOURCE_EXTENDED', 1, add_to_cflags=True)
index 90f5d7f..ffff44d 100644 (file)
@@ -654,7 +654,7 @@ msg.msg_accrightslen = sizeof(fd);
             # we would normally use --libs here, but cups-config incorrectly adds
             # gssapi_krb5 and other libraries to its --libs output. That breaks the use
             # of an in-tree heimdal kerberos
-            conf.check_cfg(path=conf.env.CUPS_CONFIG, args="--cflags --ldflags",
+            conf.CHECK_CFG(path=conf.env.CUPS_CONFIG, args="--cflags --ldflags",
                            package="", uselib_store="CUPS")
         conf.CHECK_HEADERS('cups/cups.h cups/language.h', lib='cups')
         conf.CHECK_FUNCS_IN('httpConnect httpConnectEncrypt', 'cups')
@@ -1523,7 +1523,7 @@ main() {
         conf.DEFINE('HAVE_CEPH', '1')
 
     if Options.options.with_glusterfs:
-        conf.check_cfg(package='glusterfs-api', args='"glusterfs-api >= 4" --cflags --libs',
+        conf.CHECK_CFG(package='glusterfs-api', args='"glusterfs-api >= 4" --cflags --libs',
                        msg='Checking for glusterfs-api >= 4', uselib_store="GFAPI")
         conf.CHECK_HEADERS('api/glfs.h', lib='gfapi')
         conf.CHECK_LIB('gfapi', shlib=True)
@@ -1540,7 +1540,7 @@ main() {
     if Options.options.enable_vxfs:
        conf.DEFINE('HAVE_VXFS', '1')
 
-    if conf.check_cfg(package='dbus-1', args='--cflags --libs',
+    if conf.CHECK_CFG(package='dbus-1', args='--cflags --libs',
                       msg='Checking for dbus', uselib_store="DBUS-1"):
         if (conf.CHECK_HEADERS('dbus/dbus.h', lib='dbus-1')
                                       and conf.CHECK_LIB('dbus-1', shlib=True)):
index 5c80429..0cc54fb 100644 (file)
@@ -7,7 +7,7 @@ if not conf.env.NCURSES_CONFIG:
     conf.find_program('ncurses6-config', var='NCURSES_CONFIG')
 
 if conf.env.NCURSES_CONFIG:
-    conf.check_cfg(path=conf.env.NCURSES_CONFIG, args="--cflags --libs",
+    conf.CHECK_CFG(path=conf.env.NCURSES_CONFIG, args="--cflags --libs",
                package="", uselib_store="NCURSES")
 
 conf.CHECK_HEADERS('ncurses.h menu.h panel.h form.h', lib='ncurses')
index cbba87d..0223d73 100644 (file)
@@ -21,12 +21,12 @@ def configure(conf):
             conf.fatal("--disable-gnutls given: Building the AD DC requires GnuTLS (eg libgnutls-dev, gnutls-devel) for ldaps:// support and for the BackupKey protocol")
         return
 
-    if conf.check_cfg(package='gnutls',
+    if conf.CHECK_CFG(package='gnutls',
                       args='"gnutls >= 3.0.0" --cflags --libs',
                       msg='Checking for gnutls >= 3.0.0s', mandatory=False):
         conf.DEFINE('HAVE_GNUTLS3', 1)
     else:
-        conf.check_cfg(package='gnutls',
+        conf.CHECK_CFG(package='gnutls',
                        args='"gnutls >= 1.4.0 gnutls != 2.2.4 gnutls != 2.8.0 gnutls != 2.8.1" --cflags --libs',
                        msg='Checking for gnutls >= 1.4.0 and broken versions', mandatory=False)
 
diff --git a/wscript b/wscript
index 23f9479..d6db12c 100644 (file)
--- a/wscript
+++ b/wscript
@@ -216,7 +216,7 @@ def configure(conf):
             conf.env['ENABLE_RELRO'] = True
 
     if Options.options.enable_systemd != False:
-        conf.check_cfg(package='libsystemd-daemon', args='--cflags --libs',
+        conf.CHECK_CFG(package='libsystemd-daemon', args='--cflags --libs',
                        msg='Checking for libsystemd-daemon', uselib_store="SYSTEMD-DAEMON")
         conf.CHECK_HEADERS('systemd/sd-daemon.h', lib='systemd-daemon')
         conf.CHECK_LIB('systemd-daemon', shlib=True)
index ce49ab7..38397e3 100644 (file)
@@ -21,11 +21,11 @@ else:
 
 conf.find_program('krb5-config', path_list=path_krb5_config, var='KRB5_CONFIG')
 if conf.env.KRB5_CONFIG:
-    conf.check_cfg(path=conf.env.KRB5_CONFIG, args="--cflags --libs",
+    conf.CHECK_CFG(path=conf.env.KRB5_CONFIG, args="--cflags --libs",
                package="", uselib_store="KRB5")
     krb5_define_syslib(conf, "krb5", conf.env['LIB_KRB5'])
 
-    conf.check_cfg(path=conf.env.KRB5_CONFIG, args="--cflags --libs",
+    conf.CHECK_CFG(path=conf.env.KRB5_CONFIG, args="--cflags --libs",
                package="gssapi", uselib_store="GSSAPI")
     krb5_define_syslib(conf, "gssapi", conf.env['LIB_GSSAPI'])
     if 'k5crypto' in conf.env['LIB_GSSAPI']:
@@ -54,7 +54,7 @@ if conf.env.KRB5_CONFIG:
         else:
             Logs.info('%s is detected, MIT krb5 build can proceed' % (kversion))
 
-conf.check_cfg(args="--cflags --libs", package="com_err", uselib_store="com_err")
+conf.CHECK_CFG(args="--cflags --libs", package="com_err", uselib_store="com_err")
 conf.CHECK_FUNCS_IN('_et_list', 'com_err')
 conf.CHECK_HEADERS('com_err.h', lib='com_err')