# HG changeset patch # User Olaf Wintermann # Date 1736682020 -3600 # Node ID e0478362c2cf6f7208118e46bc618ef199bddd83 # Parent 7241d072ace48c4e24a17c24a96cc2f3f4567f90 add command check to check_c_compiler/check_cpp_compiler, because some shells print an error if it doesn't exist diff -r 7241d072ace4 -r e0478362c2cf src/main/resources/make/toolchain.sh --- a/src/main/resources/make/toolchain.sh Sun Jan 12 11:26:16 2025 +0100 +++ b/src/main/resources/make/toolchain.sh Sun Jan 12 12:40:20 2025 +0100 @@ -17,6 +17,10 @@ check_c_compiler() { + command -v $1 2>&1 >/dev/null + if [ $? -ne 0 ]; then + return 1 + fi cat > "$TEMP_DIR/test.c" << __EOF__ /* test file */ #include @@ -41,6 +45,10 @@ check_cpp_compiler() { + command -v $1 2>&1 >/dev/null + if [ $? -ne 0 ]; then + return 1 + fi cat > "$TEMP_DIR/test.cpp" << __EOF__ /* test file */ #include diff -r 7241d072ace4 -r e0478362c2cf test/make/toolchain.sh --- a/test/make/toolchain.sh Sun Jan 12 11:26:16 2025 +0100 +++ b/test/make/toolchain.sh Sun Jan 12 12:40:20 2025 +0100 @@ -17,6 +17,10 @@ check_c_compiler() { + command -v $1 2>&1 >/dev/null + if [ $? -ne 0 ]; then + return 1 + fi cat > "$TEMP_DIR/test.c" << __EOF__ /* test file */ #include @@ -41,6 +45,10 @@ check_cpp_compiler() { + command -v $1 2>&1 >/dev/null + if [ $? -ne 0 ]; then + return 1 + fi cat > "$TEMP_DIR/test.cpp" << __EOF__ /* test file */ #include