From 5e69259671d317aebaae54ec9adc30e58f70076f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 20 Apr 2010 23:17:32 +1000 Subject: build: added uname display and SYSTEM_UNAME define suggestion from Metze --- buildtools/wafsamba/samba_conftests.py | 19 +++++++++++++++++++ buildtools/wafsamba/wscript | 3 +++ 2 files changed, 22 insertions(+) (limited to 'buildtools') diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py index e86f9393fe..17947582eb 100644 --- a/buildtools/wafsamba/samba_conftests.py +++ b/buildtools/wafsamba/samba_conftests.py @@ -237,3 +237,22 @@ WriteMakefile( conf.check_message_2('ok') return True + + +@conf +def CHECK_UNAME(conf, flags=None, msg=None, define=None): + '''return uname result''' + cmd = ['uname'] + if flags is not None: + cmd.append(flags) + if msg is None: + msg = 'Checking uname' + conf.COMPOUND_START(msg) + ret = Utils.cmd_output(cmd) + ret = ret.strip() + conf.COMPOUND_END(ret) + if define: + conf.DEFINE(define, ret, quote=True) + return ret + + diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index a49e5e7368..66e1ae518e 100644 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -130,6 +130,9 @@ def configure(conf): conf.check_tool('gnu_dirs') conf.check_tool('wafsamba') + conf.CHECK_UNAME(msg='Checking system type', define='SYSTEM_UNAME') + conf.CHECK_UNAME(flags='-a') + conf.CHECK_CC_ENV() conf.check_tool('compiler_cc') -- cgit