default 10.6 KB
Newer Older
Uwe Schulzweida's avatar
Uwe Schulzweida committed
1
2
3
4
#! /bin/sh
#
# default configuration options and compiler flags for different hosts
#
Uwe Schulzweida's avatar
Uwe Schulzweida committed
5
6
7
#
CONFPATH=`echo $0 | cut -c 1-6`
if [ "$CONFPATH" != "../../" ] ; then
8
  CONFPATH='./'
Uwe Schulzweida's avatar
Uwe Schulzweida committed
9
10
fi
#
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
COMP=""
HOSTNAME=`hostname`
#
while test $# != 0
do
  case $1 in
      CC=?*)
          COMP=`expr "X$1" : 'X[^=]*=\(.*\)'`
          ;;
      *)
          HOSTNAME=$1
          ;;
  esac
  shift
done
Uwe Schulzweida's avatar
Uwe Schulzweida committed
26
#
Uwe Schulzweida's avatar
Uwe Schulzweida committed
27
set -x
Uwe Schulzweida's avatar
Uwe Schulzweida committed
28
29
#
case "${HOSTNAME}" in
30
31
# i386-apple-darwin10
    bailung*|d133*|d134*)
32
33
        CDOLIBS="--with-fftw3 \
                 --with-jasper=$HOME/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
34
35
36
37
38
39
40
41
                 --with-grib_api=$HOME/local/gribapi-1.10.4 \
                 --with-netcdf=$HOME/local \
                 --with-hdf5=$HOME/local \
                 --with-szlib=$HOME/local \
                 --with-udunits2=$HOME/local/udunits-2.1.24 \
                 --with-proj=/opt/local \
                 --with-curl=/opt/local"

Uwe Schulzweida's avatar
Uwe Schulzweida committed
42
        if  test "$COMP" = icc ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
43
	  ${CONFPATH}configure  \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
44
45
46
47
                    $CDOLIBS \
                    LIBS="-L/opt/local/lib -lopenjpeg" \
	            CC=icc CFLAGS="-g -Wall -O3 -vec-report2 -march=native -fp-model source -fast-transcendentals"
        elif  test "$COMP" = clang ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
48
	  ${CONFPATH}configure  \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
49
50
51
                    $CDOLIBS \
                    LIBS="-L/opt/local/lib -lopenjpeg" \
	            CC=clang CFLAGS="-g -Wall -O3"
52
53
        else
	  ${CONFPATH}configure --prefix=$HOME/local \
54
                    --enable-maintainer-mode \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
55
56
                    $CDOLIBS \
                    LIBS="-L/opt/local/lib -lopenjpeg" \
57
	            CC=gcc CFLAGS="-g -pipe -Wall -W -Wfloat-equal -pedantic -O3 -march=native -fstack-protector"
58
#                    --with-libxml2=/usr 
59
60
#                    --with-magics=/Users/m214003/local/magics-2.14.9
        fi
61
	;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
62
    hama*)
63
64
        CDOLIBS="--with-fftw3 \
                 --with-jasper=/opt/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
65
66
67
68
69
70
71
                 --with-grib_api=$HOME/local/gribapi-1.9.16 \
                 --with-netcdf=/opt/local \
                 --with-hdf5=/opt/local \
                 --with-szlib=$HOME/local \
                 --with-proj=/opt/local \
                 --with-curl=/opt/local"

72
73
        if  test "$COMP" = icc ; then
	  ${CONFPATH}configure --prefix=$HOME/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
74
                    $CDOLIBS \
75
	            CC=icc CFLAGS="-g -Wall -O3 -vec-report2 -march=native -openmp -fp-model source -fast-transcendentals"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
76
77
78
79
        elif  test "$COMP" = clang ; then
	  ${CONFPATH}configure  \
                    $CDOLIBS \
	            CC=clang CFLAGS="-g -Wall -O3"
80
81
        else
	  ${CONFPATH}configure --prefix=$HOME/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
82
                    --enable-maintainer-mode \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
83
                    $CDOLIBS \
84
	            CC=gcc CFLAGS="-g -pipe -Wall -W -Wfloat-equal -pedantic -O3 -march=native -fstack-protector"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
85
86
#                    --with-libxml2=/usr \
#                    --with-magics=/Users/m214003/local/Magics-2.18.14nio \
87
        fi
Uwe Schulzweida's avatar
Uwe Schulzweida committed
88
	;;
89
90
# x86_64-squeeze-x64-linux
    thunder*)
91
        CDOLIBS="--with-jasper=/sw/squeeze-x64/jasper-1.900.1-static \
92
93
94
95
                    --with-grib_api=/sw/squeeze-x64/grib_api-1.9.9-static \
                    --with-netcdf=/sw/squeeze-x64/netcdf-4.2-static \
                    --with-hdf5=/sw/squeeze-x64/hdf5-1.8.8-static \
                    --with-szlib=/sw/squeeze-x64/szip-2.1 \
96
                    --with-udunits2=/sw/squeeze-x64/udunits-2.1.19 \
97
98
99
100
101
                    --with-proj=/sw/squeeze-x64/proj-4.7.0"

        if  test "$COMP" = icc ; then
          ${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
                    --enable-all-static \
102
                    --with-fftw3 \
103
104
                    $CDOLIBS \
	            CC=icc CFLAGS="-g -Wall -O3 -vec-report2 -march=native -fp-model source -fast-transcendentals"
105
106
107
108
109
        elif  test "$COMP" = pgcc ; then
          ${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
                    --enable-all-static \
                    $CDOLIBS \
	            CC=pgcc CFLAGS="-g -fast"
110
111
112
	else
          ${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
                    --enable-all-static \
113
                    --with-fftw3 \
114
                    $CDOLIBS \
115
                    CC=gcc CFLAGS='-g -Wall -O3 -march=native'
116
	fi
117
	;;
118
# x86_64-lenny-linux-gnu
Uwe Schulzweida's avatar
Uwe Schulzweida committed
119
    squall*)
120
121
122
123
124
125
126
127
128
        ${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/squeeze-x64 \
                    --enable-all-static \
                    --with-jasper=/sw/squeeze-x64/jasper-1.900.1-static \
                    --with-grib_api=/sw/squeeze-x64/grib_api-1.9.9-static \
                    --with-netcdf=/sw/squeeze-x64/netcdf-4.2-static \
                    --with-hdf5=/sw/squeeze-x64/hdf5-1.8.8-static \
                    --with-szlib=/sw/squeeze-x64/szip-2.1 \
                    --with-udunits2=/sw/squeeze-x64/udunits-2.1.19 \
                    --with-proj=/sw/squeeze-x64/proj-4.7.0 \
129
                    CC=gcc CFLAGS='-g -Wall -O3'
130
	;;
131
132
133
134
135
136
137
138
139
140
141
142
# ia64-xxx-linux
    ds*)
	${CONFPATH}configure --prefix=$HOME/local \
                    --with-netcdf=/pool/ia64/netcdf/netcdf-3.6.0-p1 \
                    --with-szlib=$HOME/local \
                    CC=icc CFLAGS="-g -O2 -Wall -fno-alias -DMIN_BUF_SIZE=4194304"
	;;
    wasser*)
	${CONFPATH}configure --prefix=$HOME/local \
                    --with-netcdf=/home/dkrz/m214089/local/ia64 \
                    CC=icc CFLAGS="-g -O2 -Wall -fno-alias"
	;;
143
144
# x86_64-archlinux
    thingol*)
145
146
 	${CONFPATH}configure --prefix=$HOME/local \
                    --program-suffix=-dev \
147
                    --enable-maintainer-mode \
Ralf Müller's avatar
Ralf Müller committed
148
149
150
151
152
153
	            --with-netcdf=$HOME/src/cdo/branches/libs4cdo/build-dev \
	              --with-hdf5=$HOME/src/cdo/branches/libs4cdo/build-dev \
                     --with-szlib=$HOME/src/cdo/branches/libs4cdo/build-dev \
                  --with-grib_api=$HOME/src/cdo/branches/libs4cdo/build-dev \
                    --with-jasper=$HOME/src/cdo/branches/libs4cdo/build-dev \
                    --with-magics=$HOME/src/cdo/branches/libs4cdo/build-dev \
154
                    --with-libxml2=/usr \
155
                      --with-pic \
156
                      CC=gcc CFLAGS="-g -Wall -O2 -DWITH_DATA" \
157
                      LDFLAGS='-L/home/ram/local/netcdf-4.1.2/lib -L/usr/lib64 -L/usr/lib -lhdf5_hl -lhdf5  -lz -lm -lhdf5_hl -lhdf5 -lz  -lcurl -L/usr/local/lib64 -L/usr/X11R6/lib64 -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo   -lexpat -lpthread -lfontconfig -lz -lgd -lproj -lgrib_api -lpng -lxml2 -lm -ljasper -lopenjpeg   -L/home/ram/local/netcdf-4.1.2/lib -lnetcdf_c++ -lnetcdf  -lcurl  -lstdc++ -lgfortran'
158
	;;
159
160
161
162
163
164
165
166
167
168
# standard workstations at MPI-M x86_64-lenny
    mpipc* )
	${CONFPATH}configure \
               --prefix=`pwd`/build \
               --enable-maintainer-mode \
               --with-netcdf='/sw/lenny-x64/netcdf-latest-gccsys' \
               --with-hdf5='/sw/lenny-x64/hdf5-latest' \
               --with-szlib='/sw/lenny-x64/szip-latest' \
               --with-proj='/sw/lenny-x64/proj-latest' \
               --enable-ruby --enable-swig --enable-python \
169
	           CC=gcc CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O2"
170
        ;;
171
# dap enabled
172
    egmont | columbine)
173
174
175
176
 	  ${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/etch-ia32 \
	            --with-netcdf=/sw/etch-ia32/netcdf-4.1.1-gcc \
	            --with-hdf5=/sw/etch-ia32/hdf5-1.8.4-threadsafe \
                    --with-zlib=/sw/etch-ia32/zlib-1.2.3 \
177
                    --with-szlib=/sw/etch-ia32/szip-2.1 \
178
                    --with-proj=/sw/etch-ia32/proj-4.6.0 \
179
	            --enable-all-static CC=icc CFLAGS="-g -fast -openmp" AR=xiar LD=xild
180
#	            CC=gcc CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O2"
181
    ;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
182
# i386-pc-solaris2.10
Uwe Schulzweida's avatar
Uwe Schulzweida committed
183
    grim | mil* )
Uwe Schulzweida's avatar
Uwe Schulzweida committed
184
	${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/solaris10-x86 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
185
                    --with-netcdf=/client \
186
                    --with-szlib=$HOME/local/solaris10-x86 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
187
188
189
190
                    CC=cc CFLAGS="-g -mt -fast"
	;;
# sx6-nec-superux12.2
    cs*)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
191
	${CONFPATH}configure --prefix=$HOME/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
192
         	    --with-netcdf=/pool/netcdf/netcdf-3.6.0-p1 \
193
		    CC=cc \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
194
195
196
                    CFLAGS="-O -Onooverlap,restrict=all -pvctl,fullmsg,noassume,loopcnt=1000000"
	;;
    sx6)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
197
	${CONFPATH}configure --host=sx6 --prefix=$HOME/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
198
                    --with-netcdf=/pool/SX-6/netcdf/netcdf-3.6.0-p1 \
199
		    CC=sxcc AR=sxar \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
200
201
202
                    CFLAGS="-O -Onooverlap,restrict=all -pvctl,fullmsg,noassume,loopcnt=1000000"
	;;
    es)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
203
	${CONFPATH}configure --host=sx6 --prefix=$HOME/local/ES \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
204
                    --with-netcdf=/S/n010/home010/c0148/local/SX \
205
		    CC=escc AR=esar \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
206
207
                    CFLAGS="-O -Onooverlap,restrict=all -pvctl,fullmsg,noassume,loopcnt=1000000"
	;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
208
# x86_64-unknown-linux-gnu (rhel55)
209
    wizard*)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
210
        LDFLAGS="-lpng"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
211
        export LDFLAGS
212
	${CONFPATH}configure --prefix=$HOME/local/centos58-x64 \
213
214
215
                    --with-proj=/sw/centos58-x64/proj-4.7.0 \
                    --with-hdf5=/sw/centos58-x64/hdf5-1.8.10-patch1 \
                    --with-udunits2=/sw/centos58-x64/udunits-2.1.19 \
216
217
218
219
                    --with-jasper=/sw/centos58-x64/jasper-1.900.1 \
                    --with-grib_api=/sw/centos58-x64/grib_api-1.9.0-static \
                    --with-netcdf=/sw/centos58-x64/netcdf-4.2.1.1 \
                    --with-szlib=/sw/centos58-x64/szip-2.1 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
220
                    --with-zlib=/usr \
221
	            CC=gcc CFLAGS="-g -Wall -O3"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
222
	;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
223
# powerpc-ibm-aix5.3.0.0
Uwe Schulzweida's avatar
Uwe Schulzweida committed
224
225
    blizzard*)
	${CONFPATH}configure --prefix=$HOME/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
226
                    --with-jasper=/sw/aix53/jasper-1.900.1 \
227
                    --with-grib_api=/sw/aix61/grib_api-1.9.9 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
228
229
230
                    --with-netcdf=/sw/aix61/netcdf-4.2-threadsafe \
                    --with-hdf5=/sw/aix61/hdf5-1.8.8-threadsafe \
                    --with-szlib=/sw/aix61/szip-2.1-threadsafe \
231
                    --with-udunits2=/sw/aix61/udunits-2.1.14 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
232
                    --with-proj=/sw/aix53/proj-4.6.1 \
233
                    --with-curl=/sw/aix61/curl-7.21.3 \
234
                    AR="ar -X 64"  LDFLAGS="-brtl -R/sw/aix61/openssl-1.0.0d/lib:/sw/aix61/zlib-1.2.6/lib" \
235
 	            CC=xlc_r CFLAGS="-g -O3 -q64 -qhot -qstrict -qarch=auto -qtune=auto -qsmp=omp -DHAVE_MMAP -qthreaded"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
236
	;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
237
# powerpc-ibm-aix6.0.0.0
238
    c1a*)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
239
	${CONFPATH}configure --prefix=$HOME/local \
240
241
242
                    --with-netcdf=/usr/local/apps/netcdf/3.6.3/LP64 \
                    --with-hdf5=/usr/local/apps/hdf5/1.8.1/LP64 \
                    --with-szlib=/usr/local/apps/szip/2.1/LP64 \
243
                    AR="ar -X 64"  LDFLAGS="-brtl" \
244
	            CC=xlc_r CFLAGS="-g -O3 -q64 -qhot -qstrict -qarch=auto -qtune=auto -qsmp=omp -DHAVE_MMAP -qthreaded"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
245
246
247
248
249
	;;
    *)
	echo "configuration for hostname $HOSTNAME not found!"
	;;
esac