gray/configure

32 lines
567 B
Plaintext
Raw Permalink Normal View History

#!/bin/sh
printf "Running on "
case `uname -s` in
Linux*) echo "Linux" ;;
Darwin*) echo "Mac" ;;
[CIGWIN,MINGW]*) echo "Windows" ;;
*) echo "unknown OS" ;;
esac
printf "OS version " && uname -r
arch=`uname -m`
echo "Processor architecture $arch"
check() {
printf "Looking for %s... " $1 && command -v $1 || (echo "not found"; exit 1)
return $?
}
for FC in ifort gfortran f77; do
check $FC && break
done
if [ $? -ne 0 ]; then
echo "Fortran compiler not found. Cannot proceed"
exit 1
else
echo "Use $FC as Fortran compiler"
fi
# $FC --version