summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-09-21 10:11:22 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2012-09-21 10:11:22 -0400
commit166afc43e0bc2636b6824dd56b59ddbf12ddb4c1 (patch)
tree1d34a3aa000c32edc03adaf165dc14c40f795a78
parentc8de7654682dd8f5efa920f79d6041f2cac2fbeb (diff)
downloadgem5-166afc43e0bc2636b6824dd56b59ddbf12ddb4c1.tar.xz
Scons: Verbose messages when dependencies are not installed
This patch adds a few more checks to ensure that a compiler is present on the system, along with swig. It references the relevant packages on Ubuntu/RedHat, and also adds a similar line for the Python headers.
-rwxr-xr-xSConstruct13
1 files changed, 13 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index d2e6b1233..515f6047b 100755
--- a/SConstruct
+++ b/SConstruct
@@ -192,6 +192,18 @@ main.Decider('MD5-timestamp')
main.root = Dir(".") # The current directory (where this file lives).
main.srcdir = Dir("src") # The source directory
+main_dict_keys = main.Dictionary().keys()
+
+# Check that we have a C/C++ compiler
+if not ('CC' in main_dict_keys and 'CXX' in main_dict_keys):
+ print "No C++ compiler installed (package g++ on Ubuntu and RedHat)"
+ Exit(1)
+
+# Check that swig is present
+if not 'SWIG' in main_dict_keys:
+ print "swig is not installed (package swig on Ubuntu and RedHat)"
+ Exit(1)
+
# add useful python code PYTHONPATH so it can be used by subprocesses
# as well
main.AppendENVPath('PYTHONPATH', extra_python_paths)
@@ -763,6 +775,7 @@ if main['M5_BUILD_CACHE']:
# verify that this stuff works
if not conf.CheckHeader('Python.h', '<>'):
print "Error: can't find Python.h header in", py_includes
+ print "Install Python headers (package python-dev on Ubuntu and RedHat)"
Exit(1)
for lib in py_libs: