forked from m3g/packmol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·52 lines (49 loc) · 1.07 KB
/
configure
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
#
# Configure file for packmol
#
# If you want to set your own compiler, run the script with:
#
# ./configure gfortran
#
# where "gfortran" can be substituted by the compiler you use,
# put the path if it is not in the path, for example,
# /usr/bin/gfortran
#
#
# List of possible compilers:
compilerlist="
$1
gfortran
f77
fort77
ifc
ifort
"
#
#
IFS=$'\n'
for searchcompiler in $compilerlist; do
compiler=`which $searchcompiler`
if [ "$compiler" \> " " ]; then
echo "Setting compiler to $compiler"
makefile=`cat Makefile`
\rm -f Makefile
for line in $makefile; do
echo ${line//"FORTRAN="*/"FORTRAN=$compiler"} >> Makefile
done
exit
fi
done
echo " "
echo " ERROR: Could not find any fortran compiler."
echo " "
echo " To use your own compiler, run this script with: "
echo " "
echo " ./configure /path/to/compiler/yourcompiler "
echo " "
echo " Otherwise, install one of the following compilers"
echo " and run this configure script again:"
echo " "
echo " gfortran, f77, fort77, ifc, ifort"
echo " "