aboutsummaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-12-02 15:22:42 +0000
committerlloyd <[email protected]>2011-12-02 15:22:42 +0000
commitd580782ae6b5dfe7e23f59b4bcac4f168d17055f (patch)
tree3a05a944c157f41ee021fce211ffbe3aefc59776 /configure.py
parentec4f86fad8e84ca7391ba79adc854775537cfc19 (diff)
Warn the user if targetting for GCC on Windows without an explicit
--os=windows since likely they actually wanted either --os=cygwin or --os=mingw
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/configure.py b/configure.py
index 6fdaf16e7..876108a9f 100755
--- a/configure.py
+++ b/configure.py
@@ -1686,15 +1686,6 @@ def main(argv = None):
(modules, archinfo, ccinfo, osinfo) = load_info_files(options)
- if options.os is None:
- options.os = platform.system().lower()
-
- if re.match('^cygwin_.*', options.os):
- logging.debug("Converting '%s' to 'cygwin'", options.os)
- options.os = 'cygwin'
-
- logging.info('Guessing target OS is %s (use --os to set)' % (options.os))
-
if options.compiler is None:
if options.os == 'windows':
if have_program('g++') and not have_program('cl'):
@@ -1706,6 +1697,18 @@ def main(argv = None):
logging.info('Guessing to use compiler %s (use --cc to set)' % (
options.compiler))
+ if options.os is None:
+ options.os = platform.system().lower()
+
+ if re.match('^cygwin_.*', options.os):
+ logging.debug("Converting '%s' to 'cygwin'", options.os)
+ options.os = 'cygwin'
+
+ if options.os == 'windows' and options.compiler == 'gcc':
+ logging.warning('Detected GCC on Windows; use --os=cygwin or --os=mingw?')
+
+ logging.info('Guessing target OS is %s (use --os to set)' % (options.os))
+
if options.compiler not in ccinfo:
raise Exception('Unknown compiler "%s"; available options: %s' % (
options.compiler, ' '.join(sorted(ccinfo.keys()))))