forked from sirocco-rt/sirocco
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure
More file actions
executable file
·47 lines (38 loc) · 823 Bytes
/
configure
File metadata and controls
executable file
·47 lines (38 loc) · 823 Bytes
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
#!/bin/sh
# Shell script for configuring Python radiative transfer code compilation
# James Matthews, University of Southampton
# Questions: jm8g08@soton.ac.uk
# Usage: ./configure
MPICC="True"
printf "Configuring Makefile for Python radiative transfer code\n"
printf "Checking for mpicc..."
if hash mpicc 2>/dev/null; then
printf "yes\n"
MPICC_IN=1
else
printf "no\n"
MPICC_IN=0
fi
printf "Checking for gcc..."
if hash gcc 2>/dev/null; then
printf "yes\n"
GCC_IN=1
else
printf "no\n"
GCC_IN=0
fi
printf "Preparing Makefile..."
if [ "$MPICC_IN" -eq 0 ]
then
if [ "$GCC_IN" -eq 1 ]
then
cp Makefile.in Makefile
sed -i -e 's/mpicc/gcc/' Makefile
printf "Done.\n"
else
printf "failed.\nNo gcc or mpicc installed. You need a C compiler!\n"
fi
else
cp Makefile.in Makefile
printf "Done.\n"
fi