-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·145 lines (123 loc) · 5.04 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#!/bin/bash
#
#====================================================================#
# #
# Copyright 2002,2003,2004,2005,2006,2007,2008,2009 #
# Mikael Granvik, Jenni Virtanen, Karri Muinonen, Teemu Laakso, #
# Dagmara Oszkiewicz #
# #
# This file is part of OpenOrb. #
# #
# OpenOrb is free software: you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# OpenOrb is distributed in the hope that it will be useful, but #
# WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #
# General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with OpenOrb. If not, see <http://www.gnu.org/licenses/>. #
# #
#====================================================================#
#
# Script for selecting the compiler and setting general options.
#
# Author: MG
# Version: 2009-11-13
#
include_file=Makefile.include
rm -f $include_file
if [[ $1 == absoft ]] ; then
echo 'FC = $(FC_ABSOFT)' > $include_file
if [[ $2 == opt ]] ; then
echo 'FCOPTIONS = $(FCOPTIONS_OPT_ABSOFT)' >> $include_file
else
echo 'FCOPTIONS = $(FCOPTIONS_DEB_ABSOFT)' >> $include_file
fi
echo 'FC_INC = $(FC_INC_ABSOFT)' >> $include_file
echo 'FC_SHARED = $(FC_SHARED_ABSOFT)' >> $include_file
elif [[ $1 == compaq ]] ; then
echo 'FC = $(FC_COMPAQ)' > $include_file
if [[ $2 == opt ]] ; then
echo 'FCOPTIONS = $(FCOPTIONS_OPT_COMPAQ)' >> $include_file
else
echo 'FCOPTIONS = $(FCOPTIONS_DEB_COMPAQ)' >> $include_file
fi
echo 'FC_INC = $(FC_INC_COMPAQ)' >> $include_file
echo 'FC_SHARED = $(FC_SHARED_COMPAQ)' >> $include_file
elif [[ $1 == ibm ]] ; then
if [[ $2 == opt ]] ; then
echo 'FC = $(FC_SER_IBM)' > $include_file
echo 'FCOPTIONS = $(FCOPTIONS_OPT_IBM)' >> $include_file
elif [[ $2 == par ]] ; then
echo 'FC = $(FC_PAR_IBM)' > $include_file
echo 'FCOPTIONS = $(FCOPTIONS_PAR_IBM)' >> $include_file
else
echo 'FC = $(FC_SER_IBM)' > $include_file
echo 'FCOPTIONS = $(FCOPTIONS_DEB_IBM)' >> $include_file
fi
echo 'FC_INC = $(FC_INC_IBM)' >> $include_file
echo 'FC_SHARED = $(FC_SHARED_IBM)' >> $include_file
elif [[ $1 == intel ]] ; then
echo 'FC = $(FC_INTEL)' > $include_file
if [[ $2 == opt ]] ; then
echo 'FCOPTIONS = $(FCOPTIONS_OPT_INTEL)' >> $include_file
else
echo 'FCOPTIONS = $(FCOPTIONS_DEB_INTEL)' >> $include_file
fi
echo 'FC_INC = $(FC_INC_INTEL)' >> $include_file
echo 'FC_SHARED = $(FC_SHARED_INTEL)' >> $include_file
elif [[ $1 == lahey ]] ; then
echo 'FC = $(FC_LAHEY)' > $include_file
if [[ $2 == opt ]] ; then
echo 'FCOPTIONS = $(FCOPTIONS_OPT_LAHEY)' >> $include_file
else
echo 'FCOPTIONS = $(FCOPTIONS_DEB_LAHEY)' >> $include_file
fi
echo 'FC_INC = $(FC_INC_LAHEY)' >> $include_file
echo 'FC_SHARED = $(FC_SHARED_LAHEY)' >> $include_file
elif [[ $1 == sun ]] ; then
echo 'FC = $(FC_SUN)' > $include_file
if [[ $2 == opt ]] ; then
echo 'FCOPTIONS = $(FCOPTIONS_OPT_SUN)' >> $include_file
elif [[ $2 == par ]] ; then
echo 'FCOPTIONS = $(FCOPTIONS_PAR_SUN)' >> $include_file
else
echo 'FCOPTIONS = $(FCOPTIONS_DEB_SUN)' >> $include_file
fi
echo 'FC_INC = $(FC_INC_SUN)' >> $include_file
echo 'FC_SHARED = $(FC_SHARED_SUN)' >> $include_file
elif [[ $1 == g95 ]] ; then
echo 'FC = $(FC_G95)' > $include_file
if [[ $2 == opt ]] ; then
echo 'FCOPTIONS = $(FCOPTIONS_OPT_G95)' >> $include_file
else
echo 'FCOPTIONS = $(FCOPTIONS_DEB_G95)' >> $include_file
fi
echo 'FC_INC = $(FC_INC_G95)' >> $include_file
echo 'FC_SHARED = $(FC_SHARED_G95)' >> $include_file
elif [[ $1 == gfortran ]] ; then
echo 'FC = $(FC_GFORTRAN)' > $include_file
if [[ $2 == opt ]] ; then
echo 'FCOPTIONS = $(FCOPTIONS_OPT_GFORTRAN)' >> $include_file
else
echo 'FCOPTIONS = $(FCOPTIONS_DEB_GFORTRAN)' >> $include_file
fi
echo 'FC_INC = $(FC_INC_GFORTRAN)' >> $include_file
echo 'FC_SHARED = $(FC_SHARED_GFORTRAN)' >> $include_file
else
echo Erroneous compiler: $1
rm -f $include_file
fi
# Options for liboorb and Python wrappers.
SYSTEM=`uname -s`
if [[ ${SYSTEM} == "Linux" ]] ; then
echo 'LIBEXT = so' >> $include_file
elif [[ ${SYSTEM} == "Darwin" ]] ; then
echo 'LIBEXT = dylib' >> $include_file
else
echo 'LIBEXT = so' >> $include_file
fi