Fix check_opengl_context bug, where an early exit wouldn't delete the code file, and subsequent tries would append to the already existent file, causing compile failures.
@@ -227,6 +227,8 @@ function check_opengl_context()
$CXX_COMPILER checkogl.cpp -Wl,-lGL -lSM -lICE -lX11 -lXext
if [[ $? != 0 ]]; then
echo "failed to compile checkogl.cpp"
+ rm -f checkogl.cpp
+ rm -f a.out
exit 1
fi
./a.out
