Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
build: print error message if no compiler found
Browse files Browse the repository at this point in the history
Make the configure script warn the user about the lack of an acceptable
C compiler on the system.
  • Loading branch information
javihernandez authored and bnoordhuis committed May 5, 2012
1 parent 9f3c639 commit 792d9a9
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions configure
Expand Up @@ -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]

Expand Down

0 comments on commit 792d9a9

Please sign in to comment.