From 73f6fed4d61f69cbbbd911e3c5549f39cea05ac7 Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Fri, 14 May 2010 11:03:19 +0200 Subject: s3-waf: more elaborate host_os check for STAT_ST_BLOCKSIZE --- source3/wscript | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'source3') diff --git a/source3/wscript b/source3/wscript index 1a526bcb42..30736ad209 100644 --- a/source3/wscript +++ b/source3/wscript @@ -420,14 +420,21 @@ krb5_get_credentials_for_user krb5_get_host_realm krb5_free_host_realm''', # FIXME: these should be tests for features, but the old build system just # checks for OSes. - host_os = conf.env['SYSTEM_UNAME_SYSNAME'].lower() + import sys + host_os = sys.platform # Python doesn't have case switches... :/ # FIXME: original was *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu | *qnx*) - if host_os in ("linux"): - # obviously once this hook checks for more than just linux this needs to be adapted - conf.DEFINE('LINUX', '1') + # the search for .rfind('gnu') covers gnu* and *-gnu is that too broad? + if (host_os.rfind('linux') > -1) or (host_os.rfind('gnu') > -1) or (host_os.rfind('qnx') > -1): + if host_os.rfind('linux') > -1: + conf.DEFINE('LINUX', '1') + elif host_os.rfind('qnx') > -1: + conf.DEFINE('QNX', '1') conf.DEFINE('STAT_ST_BLOCKSIZE', '512') + # FIXME: Add more checks here. + else: + print "Unknown host_os '%s', please report this to samba-technical@samba.org" % host_os conf.SAMBA_CONFIG_H('include/config.h') -- cgit