build: treat a blank --build or --host as not a cross-compile
authorAndrew Tridgell <tridge@samba.org>
Fri, 7 May 2010 07:00:53 +0000 (09:00 +0200)
committerAndrew Tridgell <tridge@samba.org>
Fri, 7 May 2010 07:03:47 +0000 (09:03 +0200)
This matches autoconf behaviour

buildtools/wafsamba/wscript

index c8872eb79551d2f5dd2d2ab7141d439ff754c749..56f2e60a5beb4a4431625520c649806d22651ce9 100644 (file)
@@ -178,7 +178,9 @@ def configure(conf):
     conf.env.AUTOCONF_HOST  = Options.options.AUTOCONF_HOST
     conf.env.AUTOCONF_PROGRAM_PREFIX = Options.options.AUTOCONF_PROGRAM_PREFIX
 
-    if conf.env.AUTOCONF_BUILD != conf.env.AUTOCONF_HOST:
+    if (conf.env.AUTOCONF_HOST and
+        conf.env.AUTOCONF_BUILD and
+        conf.env.AUTOCONF_BUILD != conf.env.AUTOCONF_HOST):
         Logs.error('ERROR: Mismatch between --build and --host. Please use --cross-compile instead')
         sys.exit(1)
     if conf.env.AUTOCONF_PROGRAM_PREFIX: