32 lines
566 B
Plaintext
32 lines
566 B
Plaintext
|
#!/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 "checking 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 "Set $FC as Fortran compiler"
|
||
|
fi
|
||
|
|
||
|
$FC --version
|