summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/wscript
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-12 22:06:51 +1000
committerAndrew Tridgell <tridge@samba.org>2010-04-12 23:13:30 +1000
commitd12605c679cf4f2c5057c548de1210e7fa03a2f1 (patch)
tree55947166783069670fcded9cc18d392433482946 /buildtools/wafsamba/wscript
parent83312a9e501ebbee15b4fd2353330880496f4add (diff)
downloadsamba-d12605c679cf4f2c5057c548de1210e7fa03a2f1.tar.gz
samba-d12605c679cf4f2c5057c548de1210e7fa03a2f1.tar.bz2
samba-d12605c679cf4f2c5057c548de1210e7fa03a2f1.zip
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/wscript15
1 files changed, 15 insertions, 0 deletions
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index 2e42139bb9..87e70702dc 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',