diff options
author | Waldemar Brodkorb <w.brodkorb@deubert.it> | 2016-02-26 06:33:16 +0100 |
---|---|---|
committer | Waldemar Brodkorb <w.brodkorb@deubert.it> | 2016-02-26 06:33:16 +0100 |
commit | eb149041e833afa918d624d219c0e0311f590b3e (patch) | |
tree | 3db47b171cd5f94f3d6cf1b1f33e98eee9b51def | |
parent | 8494263e8c6d0d307dcd29b3afc654bb8603179d (diff) |
prereq: fatal error when no C/C++ compiler found
-rwxr-xr-x | scripts/prereq.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/prereq.sh b/scripts/prereq.sh index 3bcc8a361..97a0bc136 100755 --- a/scripts/prereq.sh +++ b/scripts/prereq.sh @@ -114,12 +114,17 @@ for compilerbin in $compilerbins; do if which $compilerbin >/dev/null; then printf "found\n" CC=$compilerbin + CCFOUND=1 break else printf "not found\n" continue fi done +if [ -z "$CCFOUND" ]; then + printf "ERROR: no C compiler found. Fatal error.\n" + exit 1 +fi # check for c++ compiler compilerbins="clang++ c++ g++" @@ -128,12 +133,17 @@ for compilerbin in $compilerbins; do if which $compilerbin >/dev/null; then printf "found\n" CXX=$compilerbin + CXXFOUND=1 break else printf "not found\n" continue fi done +if [ -z "$CXXFOUND" ]; then + printf "ERROR: no C++ compiler found. Fatal error.\n" + exit 1 +fi gnu_host_name=$(${CC} -dumpmachine) |