diff options
author | Javier Hernández <jhernandez@emergya.com> | 2012-05-05 02:06:24 +0400 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2012-05-05 18:31:27 +0400 |
commit | 792d9a921d492f8579c65e47214e6f91859e5e44 (patch) | |
tree | 0944ab83cc96207b520e01bfed528a5df59713c8 /configure | |
parent | 9f3c639a9cf115d39af9ea1f09e33717e40b64cd (diff) |
build: print error message if no compiler found
Make the configure script warn the user about the lack of an acceptable
C compiler on the system.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/configure b/configure index c9a29bb15fc..217d9223338 100755 --- a/configure +++ b/configure @@ -154,10 +154,20 @@ def pkg_config(pkg): def host_arch_cc(): """Host architecture check using the CC command.""" - p = subprocess.Popen(CC.split() + ['-dM', '-E', '-'], - stdin=subprocess.PIPE, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) + try: + p = subprocess.Popen(CC.split() + ['-dM', '-E', '-'], + stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + except OSError: + print '''Node.js configure error: No acceptable C compiler found! + + Please make sure you have a C compiler installed on your system and/or + consider adjusting the CC environment variable if you installed + it in a non-standard prefix. + ''' + sys.exit() + p.stdin.write('\n') out = p.communicate()[0] |