diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-04-12 22:06:51 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-04-12 23:13:30 +1000 |
commit | d12605c679cf4f2c5057c548de1210e7fa03a2f1 (patch) | |
tree | 55947166783069670fcded9cc18d392433482946 /buildtools/wafsamba/wscript | |
parent | 83312a9e501ebbee15b4fd2353330880496f4add (diff) | |
download | samba-d12605c679cf4f2c5057c548de1210e7fa03a2f1.tar.gz |
build: added cross-compilation configure options
this enables use of a cross-compilation emulator, so configure tests
run on an emulator of the target platform
Diffstat (limited to 'buildtools/wafsamba/wscript')
-rw-r--r-- | buildtools/wafsamba/wscript | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index 2e42139bb9d..87e70702dcd 100644 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -68,6 +68,17 @@ def set_options(opt): help=("Enable even more compiler warnings"), action='store_true', dest='pedantic', default=False) + opt.add_option('--cross-compile', + help=("configure for cross-compilation"), + action='store_true', dest='CROSS_COMPILE', default=False) + opt.add_option('--cross-execute', + help=("command prefix to use for cross-execution in configure"), + action='store', dest='CROSS_EXECUTE', default='') + opt.add_option('--hostcc', + help=("set host compiler when cross compiling"), + action='store', dest='HOSTCC', default=False) + + @wafsamba.runonce def configure(conf): conf.env.hlist = [] @@ -105,6 +116,10 @@ def configure(conf): conf.env.BUNDLED_EXTENSION = Options.options.BUNDLED_EXTENSION conf.env.BUNDLED_EXTENSION_EXCEPTION = Options.options.BUNDLED_EXTENSION_EXCEPTION.split(',') + conf.env.CROSS_COMPILE = Options.options.CROSS_COMPILE + conf.env.CROSS_EXECUTE = Options.options.CROSS_EXECUTE + conf.env.HOSTCC = Options.options.HOSTCC + # see if we can compile and run a simple C program conf.CHECK_CODE('printf("hello world\\n")', define='HAVE_SIMPLE_C_PROG', |