Skip to content

Commit

Permalink
[configure][bug-fix] Add existence check for compiler
Browse files Browse the repository at this point in the history
Issue: madler#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 <[email protected]>
  • Loading branch information
Eyal Itkin committed Nov 22, 2024
1 parent ef24c4c commit 1458fb6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;;
Expand Down

0 comments on commit 1458fb6

Please sign in to comment.