diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-04-21 15:15:55 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-21 15:16:01 +1000 |
commit | 667f672c94eb3e935ae3463a203dfa85b900726a (patch) | |
tree | 12af1bd5078a2f3a6c80514483ae7646dec60ec4 /buildtools/wafsamba/samba_autoconf.py | |
parent | 5e695dec2af347dd9211a1dec45f10f751bbafb5 (diff) | |
download | samba-667f672c94eb3e935ae3463a203dfa85b900726a.tar.gz samba-667f672c94eb3e935ae3463a203dfa85b900726a.tar.bz2 samba-667f672c94eb3e935ae3463a203dfa85b900726a.zip |
build: fixed uname output to be on target machine when cross compiling
this also makes the output of define_ret configure tests show up
in the configure output
Diffstat (limited to 'buildtools/wafsamba/samba_autoconf.py')
-rw-r--r-- | buildtools/wafsamba/samba_autoconf.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py index fa58e8f249..c35db9b45f 100644 --- a/buildtools/wafsamba/samba_autoconf.py +++ b/buildtools/wafsamba/samba_autoconf.py @@ -307,7 +307,7 @@ def CHECK_SIZEOF(conf, vars, headers=None, define=None): if v_define is None: v_define = 'SIZEOF_%s' % v.upper().replace(' ', '_') if not CHECK_CODE(conf, - 'printf("%%u\\n", (unsigned)sizeof(%s))' % v, + 'printf("%%u", (unsigned)sizeof(%s))' % v, define=v_define, execute=True, define_ret=True, @@ -326,7 +326,8 @@ def CHECK_CODE(conf, code, define, add_headers=True, mandatory=False, headers=None, msg=None, cflags='', includes='# .', local_include=True, lib=None, link=True, - define_ret=False, quote=False): + define_ret=False, quote=False, + on_target=True): '''check if some code compiles and/or runs''' if CONFIG_SET(conf, define): @@ -372,7 +373,12 @@ def CHECK_CODE(conf, code, define, cflags = TO_LIST(cflags) cflags.extend(ccflags) - exec_args = conf.SAMBA_CROSS_ARGS(msg=msg) + if on_target: + exec_args = conf.SAMBA_CROSS_ARGS(msg=msg) + else: + exec_args = [] + + conf.COMPOUND_START(msg) ret = conf.check(fragment=fragment, execute=execute, @@ -394,9 +400,13 @@ def CHECK_CODE(conf, code, define, if ret: if not define_ret: conf.DEFINE(define, 1) + conf.COMPOUND_END(True) + else: + conf.COMPOUND_END(conf.env[define]) return True if always: conf.DEFINE(define, 0) + conf.COMPOUND_END(False) return False |