Skip to content

Commit

Permalink
Transition to waf 1.8: wrapped conf.check_cfg
Browse files Browse the repository at this point in the history
Reviewed-By: Jelmer Vernooij <[email protected]>

(forward ported to current master by abartlet)

Reviewed-by: Andrew Bartlett <[email protected]>
  • Loading branch information
Thomas Nagy authored and abartlet committed Mar 16, 2015
1 parent 5771276 commit 3c0e3af
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 11 deletions.
4 changes: 4 additions & 0 deletions buildtools/wafsamba/samba_autoconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion buildtools/wafsamba/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions source3/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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)
Expand All @@ -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)):
Expand Down
2 changes: 1 addition & 1 deletion source3/wscript_configure_system_ncurses
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
4 changes: 2 additions & 2 deletions source4/lib/tls/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion wscript
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions wscript_configure_system_mitkrb5
Original file line number Diff line number Diff line change
Expand Up @@ -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']:
Expand Down Expand Up @@ -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')

Expand Down

0 comments on commit 3c0e3af

Please sign in to comment.