From 1458fb60cb8b43c4fa3173b385592f28e377a983 Mon Sep 17 00:00:00 2001 From: Eyal Itkin Date: Fri, 22 Nov 2024 16:21:51 +0200 Subject: [PATCH] [configure][bug-fix] Add existence check for compiler Issue: #1023 Add a configure test that verifies the presence of the compiler before we continue on using it in the following tests. If missing return an indicative error to the user. Signed-off-by: Eyal Itkin --- configure | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configure b/configure index 54c802e2..29cfa37b 100755 --- a/configure +++ b/configure @@ -184,6 +184,14 @@ else cc=${CC} fi +echo "Checking for compiler existence" >> configure.log +if which $cc >/dev/null 2>&1; then + : +else + echo "Failed to find an installed compiler." | tee -a configure.log + leave 1 +fi + case "$cc" in *gcc*) gcc=1 ;; *clang*) gcc=1 ;;