forked from plasmasim/sceptic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMFSconfigure
executable file
·61 lines (55 loc) · 1.42 KB
/
MFSconfigure
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
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# Configure script for SCEPTIC.
# Compiler choice.
if [ .$COMPILER == . ] ; then
if [ -x "`which mpif77`" ] ; then
# By default use mpif77
echo choosing compiler mpif77
COMPILER=mpif77
MPIE=scepticmpi
# COMPILE-SWITCHES choice
if [ -n "`$COMPILER --version | grep GNU`" ] ; then
echo changing compile switches
if [ -n "`$COMPILER -show | grep g77`" ] ; then
NW="-Wno-globals -Wno-unused-labels"
else
NW=" -Wno-unused-label"
fi
else
NW=$(NOWARN)
fi
else
# Else use gfortran or g77.
if [ -x "`which gfortran`" ] ; then
echo choosing compiler gfortran
COMPILER=gfortran
NW=" -Wno-unused-label"
else
if [ -x "`which g77`" ] ; then
echo choosing compiler g77
COMPILER=g77
echo changing compile switches
NW="-Wno-globals -Wno-unused-labels"
else
COMPILER=$G77
fi
fi
fi
fi
# Xlib choice.
if [ "`uname -m`" == "x86_64" ] ; then
echo choosing platform 64 bits
LIB=/usr/X11R6/lib64/
fi
cat > makefile <<EOF
# This is the configured makefile, which is used for the full make.
################ DO NOT EDIT THIS FILE. EDIT Makefile #############
# Here we have stuff that we determine by configuration.
G77=$COMPILER
XLIB=$LIB
NOWARN=$NW
MPIexecutable=$MPIE
# That ends by having the original Makefile tacked on the end.
###################################################################
EOF
cat Makefile >>makefile