summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2010-05-14 11:03:19 +0200
committerKai Blin <kai@samba.org>2010-05-20 22:16:15 +0200
commit73f6fed4d61f69cbbbd911e3c5549f39cea05ac7 (patch)
tree9a7399e826fdfb711b9bf94817dd8aaefab18eed /source3
parent9ab33162503ea5965cd7f34a9b5b9c1f13e75d0c (diff)
downloadsamba-73f6fed4d61f69cbbbd911e3c5549f39cea05ac7.tar.gz
samba-73f6fed4d61f69cbbbd911e3c5549f39cea05ac7.tar.bz2
samba-73f6fed4d61f69cbbbd911e3c5549f39cea05ac7.zip
s3-waf: more elaborate host_os check for STAT_ST_BLOCKSIZE
Diffstat (limited to 'source3')
-rw-r--r--source3/wscript15
1 files changed, 11 insertions, 4 deletions
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')