default 20.2 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
28
if test -z "$COMP" ; then COMP=gcc ; fi
#
Uwe Schulzweida's avatar
Uwe Schulzweida committed
29
set -x
Uwe Schulzweida's avatar
Uwe Schulzweida committed
30
31
#
case "${HOSTNAME}" in
32
33
# i386-apple-darwin10
    bailung*|d133*|d134*)
34
35
        CDOLIBS="--enable-nearpt3 \
                 --with-fftw3 \
36
                 --with-grib_api=$HOME/local/grib_api-1.14.7 \
37
38
39
                 --with-netcdf=$HOME/local/netcdf-c-4.3.3.1-threadsafe \
                 --with-hdf5=$HOME/local/hdf5-1.8.15-threadsafe \
                 --with-udunits2=/opt/local \
40
                 --with-curl=/opt/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
41
42
                 --with-libxml2=/usr \
                 --with-magics=$HOME/local/Magics-2.25.3 \
43
                 --with-proj=/opt/local \
44
                 --with-szlib=$HOME/local/libaec-0.3.2"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
45

46
        if  test "$COMP" = icpc ; then
47
	  ${CONFPATH}configure --enable-cxx \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
48
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
49
	            CC=icc CXX="icpc --std=c++11" CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native"
50
        elif  test "$COMP" = icc ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
51
52
	  ${CONFPATH}configure  \
                    $CDOLIBS \
53
	            CC=icc CFLAGS="-g -Wall -Wwrite-strings -O2 -qopt-report=5 -march=native"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
54
        elif  test "$COMP" = clang++ ; then
55
	  ${CONFPATH}configure --enable-cxx \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
56
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
57
	            CC=clang CXX="clang++ --std=c++11" CFLAGS="-g -Wall -O3"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
58
        elif  test "$COMP" = clang ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
59
	  ${CONFPATH}configure  \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
60
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
61
	            CC=clang CFLAGS="-g -Wall -Wwrite-strings -O3"
62
        elif  test "$COMP" = g++ ; then
63
	  ${CONFPATH}configure --enable-cxx \
64
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
65
	            CC=gcc CXX="g++ --std=c++11" CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3 -march=native"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
66
        elif  test "$COMP" = gcc ; then
67
	  ${CONFPATH}configure --prefix=$HOME/local \
68
                    --enable-maintainer-mode \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
69
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
70
	            CC=gcc CFLAGS="-g -pipe -Wall -W -Wfloat-equal -Wwrite-strings -pedantic -O3 -march=native -fstack-protector"
71
#                    --with-libxml2=/usr 
72
#                    --with-magics=/Users/m214003/local/magics-2.14.9
Uwe Schulzweida's avatar
Uwe Schulzweida committed
73
74
        else
	  ${CONFPATH}configure  $CDOLIBS  CC=$COMP
75
        fi
76
	;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
77
    hama*)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
78
79
80
81
82
#        CDOLIBS="--with-fftw3 \
#                 --with-netcdf=/opt/local \
#                 --with-hdf5=/opt/local \
#                 --with-szlib=$HOME/local \
#                 --with-proj=/opt/local \
83
#                 --with-cmor=/Users/m214003/work/CMOR \
84
#                 --with-magics=$HOME/local/magics-2.25.3 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
85
#                 --with-curl=/opt/local"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
86
87
        CDOLIBS="--enable-nearpt3 \
                 --with-fftw3 \
88
                 --with-szlib=$HOME/local \
89
                 --with-grib_api=$HOME/local/grib_api-1.21.0 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
90
91
                 --with-netcdf=$HOME/local/netcdf-c-4.4.1.1 \
                 --with-hdf5=$HOME/local/hdf5-1.8.18 \
92
                 --with-libxml2=/opt/local \
93
                 --with-proj=/opt/local"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
94

95
        if  test "$COMP" = icpc ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
96
	  ${CONFPATH}configure --enable-cxx --prefix=$HOME/local \
97
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
98
	            CC=icc CXX=icpc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native" CXX=icpc
Uwe Schulzweida's avatar
Uwe Schulzweida committed
99
        elif  test "$COMP" = icc ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
100
	  ${CONFPATH}configure \
101
102
                    $CDOLIBS \
	            CC=icc CFLAGS="-g -Wall -Wwrite-strings -O2 -qopt-report=5 -march=native"
103
        elif  test "$COMP" = clang++ ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
104
	  ${CONFPATH}configure --enable-cxx \
105
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
106
	            CC=clang CXX=clang++ CFLAGS="-g -Wall -O3"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
107
108
109
        elif  test "$COMP" = clang ; then
	  ${CONFPATH}configure  \
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
110
	            CC=clang CFLAGS="-g -Wall -Wwrite-strings -Ofast -march=native"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
111
112
113
114
        elif  test "$COMP" = pgcc ; then
	  ${CONFPATH}configure  \
                    $CDOLIBS \
	            CC=pgcc CFLAGS="-g -fast"
115
        elif  test "$COMP" = g++ ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
116
	  ${CONFPATH}configure --enable-cxx \
117
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
118
	            CC=gcc CXX=g++ CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O3"
119
120
        else
	  ${CONFPATH}configure --prefix=$HOME/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
121
                    --enable-maintainer-mode \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
122
                    $CDOLIBS \
123
	            CC=gcc CFLAGS="-g -std=c11 -pipe -Wall -Wpointer-arith -Wwrite-strings -W -Wfloat-equal -pedantic -O3 -march=native -Wa,-q -fstack-protector -funsigned-char"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
124
125
#                    --with-libxml2=/usr \
#                    --with-magics=/Users/m214003/local/Magics-2.18.14nio \
126
        fi
Uwe Schulzweida's avatar
Uwe Schulzweida committed
127
	;;
128
# win7 based cygwin virtual machine
129
    cdo4windows-cyg)
Ralf Mueller's avatar
Ralf Mueller committed
130
131
        CDOLIBS="--with-netcdf=/usr/local \
                 --with-hdf5=/usr/local \
132
                 --with-grib_api=/usr/local
133
134
135
                 --with-udunits2=/usr \
                 --with-proj=/usr"

Ralf Mueller's avatar
Ralf Mueller committed
136
137
138
139
140
        if  test "$COMP" = g++ ; then
	  ${CONFPATH}configure --prefix=/usr/local \
                    --program-suffix=-g++ \
                    --enable-cxx \
                    --enable-maintainer-mode \
141
                    $CDOLIBS \
142
	            CC=gcc CXX=g++ CFLAGS="-g -Wall -O2 -DPIC -pie -mwindows" \
Ralf Mueller's avatar
Ralf Mueller committed
143
144
                    LDFLAGS='-L/usr/local/lib' \
                    LIBS='-lpthread -lm -lcurl -lhdf5_hl -lhdf5 -lz  -lsz -laec -ldl'
145
146
147
        else
	  ${CONFPATH}configure --prefix=$HOME/local \
                    --enable-maintainer-mode \
148
                    --enable-all-static \
149
                    $CDOLIBS \
Ralf Mueller's avatar
Ralf Mueller committed
150
151
152
	            CC=gcc CFLAGS="-g -Wall -O2 -DPIC -pie -mwindows" \
                    LDFLAGS='-L/usr/local/lib' \
                    LIBS='-lpthread -lm -lcurl -lhdf5_hl -lhdf5 -lz  -lsz -laec -ldl'
153
154
        fi
	;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
155
156
    daint*)
        if  test "$COMP" = icc ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
157
          CDOLIBS="--with-netcdf=/opt/cray/netcdf/4.3.3.1/INTEL/14.0"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
158
159
160
161
	  ${CONFPATH}configure --prefix=$HOME/local \
                    $CDOLIBS \
	            CC=icc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native -openmp"
        elif  test "$COMP" = pgcc ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
162
          CDOLIBS="--with-netcdf=/opt/cray/netcdf/4.3.3.1/PGI/15.3"
163
	  ${CONFPATH}configure --disable-openmp \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
164
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
165
	            CC=pgcc CFLAGS="-g -O2"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
166
        elif  test "$COMP" = cray ; then
Uwe Schulzweida's avatar
Uwe Schulzweida committed
167
          CDOLIBS="--with-netcdf=/opt/cray/netcdf/4.3.3.1/CRAY/8.3"
168
	  ${CONFPATH}configure --disable-openmp \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
169
                    $CDOLIBS \
170
	            CC=cc CFLAGS="-g -O2 -h noomp"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
171
        else
Uwe Schulzweida's avatar
Uwe Schulzweida committed
172
          CDOLIBS="--with-netcdf=/opt/cray/netcdf/4.3.3.1/GNU/4.9"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
173
174
175
176
177
	  ${CONFPATH}configure --prefix=$HOME/local \
                    $CDOLIBS \
	            CC=gcc CFLAGS="-g -pipe -Wall -W -Wfloat-equal -pedantic -O3 -march=native -fstack-protector -Wa,-q"
        fi
	;;
178
179
# x86_64-squeeze-x64-linux
    thunder*)
180
181
182
        CDOLIBS="--with-grib_api=/sw/squeeze-x64/grib_api-1.13.0-static-gccsys \
                 --with-netcdf=/sw/squeeze-x64/netcdf-4.2-static \
                 --with-hdf5=/sw/squeeze-x64/hdf5-1.8.8-static \
183
                 --with-szlib=/sw/squeeze-x64/libaec-0.3.2-gcc48 \
184
                 --with-udunits2=/sw/squeeze-x64/udunits-2.1.19 \
185
                 --with-proj=/sw/squeeze-x64/proj-4.7.0 LIBS=-lz"
186

Uwe Schulzweida's avatar
Uwe Schulzweida committed
187
188
189
190
191
192
        if  test "$COMP" = icpc ; then
          ${CONFPATH}configure --enable-cxx --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
                    --with-fftw3 \
                    $CDOLIBS \
	            CC=icc CXX=icpc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native"
        elif  test "$COMP" = icc ; then
193
          ${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
194
                    --with-fftw3 \
195
                    $CDOLIBS \
196
	            CC=icc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native"
197
198
199
200
        elif  test "$COMP" = pgcc ; then
          ${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
                    $CDOLIBS \
	            CC=pgcc CFLAGS="-g -fast"
201
202
203
204
205
        elif  test "$COMP" = clang ; then
          ${CONFPATH}configure              --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
                    --with-fftw3 \
                    $CDOLIBS \
	            CC=clang CXX=clang++ CFLAGS="-g -O2"
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
        elif  test "$COMP" = clang++ ; then
          ${CONFPATH}configure --enable-cxx --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
                    --with-fftw3 \
                    $CDOLIBS \
	            CC=clang CXX=clang++ CFLAGS="-g -O2"
        elif  test "$COMP" = g++ ; then
	  ${CONFPATH}configure --enable-cxx \
                    $CDOLIBS \
	            CC=gcc CXX=g++ CFLAGS="-g -Wall -O3"
	else
          ${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
                    --with-fftw3 \
                    $CDOLIBS \
                    CC=gcc CFLAGS='-g -Wall -O3'
	fi
	;;
# jessie workstation x64
    breeze*)
        CDOLIBS="--with-grib_api=/sw/jessie-x64/grib_api-1.14.3-static-gccsys \
                 --with-netcdf=/sw/jessie-x64/netcdf-4.3.3.1-gccsys \
                 --with-udunits2=/sw/jessie-x64/udunits-2.2.20-gccsys \
                 --with-proj=/sw/jessie-x64/proj4-4.9.3-gccsys LIBS=-lz"
        if  test "$COMP" = icpc ; then
          ${CONFPATH}configure --enable-cxx --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
                    --with-fftw3 \
                    $CDOLIBS \
	            CC=icc CXX=icpc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native"
        elif  test "$COMP" = icc ; then
          ${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
                    --with-fftw3 \
                    $CDOLIBS \
	            CC=icc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native"
        elif  test "$COMP" = pgcc ; then
          ${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
                    $CDOLIBS \
	            CC=pgcc CFLAGS="-g"
        elif  test "$COMP" = clang ; then
          ${CONFPATH}configure              --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
                    --with-fftw3 \
                    $CDOLIBS \
	            CC=clang CXX=clang++ CFLAGS="-g -O2"
247
248
249
250
251
        elif  test "$COMP" = clang++ ; then
          ${CONFPATH}configure --enable-cxx --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
                    --with-fftw3 \
                    $CDOLIBS \
	            CC=clang CXX=clang++ CFLAGS="-g -O2"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
252
253
254
        elif  test "$COMP" = g++ ; then
	  ${CONFPATH}configure --enable-cxx \
                    $CDOLIBS \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
255
	            CC=gcc CXX=g++ CFLAGS="-g -Wall -O3"
256
257
	else
          ${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/thunder \
258
                    --with-fftw3 \
259
                    $CDOLIBS \
260
                    CC=gcc CFLAGS='-g -Wall -O3'
261
	fi
262
	;;
263
264
265
# mistral
    mlogin*)
        CDOLIBS="--with-grib_api=/sw/rhel6-x64/grib_api/grib_api-1.13.0-gcc48 \
266
267
                 --with-netcdf=/sw/rhel6-x64/netcdf/netcdf_c-4.3.2-gcc48 \
                 --with-hdf5=/sw/rhel6-x64/hdf5/hdf5-1.8.14-threadsafe-gcc48 \
268
                 --with-szlib=/sw/rhel6-x64/sys/libaec-0.3.2-gcc48 \
269
270
                 --with-udunits2=/sw/rhel6-x64/util/udunits-2.2.17-gcc48 \
                 --with-proj=/sw/rhel6-x64/graphics/proj4-4.9.1-gcc48"
271
#                 --with-magics=/sw/rhel6-x64/graphics/magicsxx-2.18.15-gfxonly-gcc48 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
272
#                 --with-cmor=/sw/rhel6-x64/cmor-2.9.2-shared-gcc48 \
273

Ralf Mueller's avatar
Ralf Mueller committed
274
275
        if  test "$COMP" = icc ; then
          ${CONFPATH}configure --prefix=$HOME/local \
276
277
278
279
                    --with-fftw3 \
                    $CDOLIBS \
	            CC=icc CFLAGS="-g -Wall -O2 -qopt-report=5 -march=native"
        elif  test "$COMP" = pgcc ; then
280
          ${CONFPATH}configure --disable-openmp \
281
282
283
                    $CDOLIBS \
	            CC=pgcc CFLAGS="-g -fast"
	else
284
          ${CONFPATH}configure --prefix=$HOME/local \
285
286
                    --with-fftw3 \
                    $CDOLIBS \
287
                    CC=gcc CFLAGS='-g -Wall -O3 -march=native -mavx2'
288
289
	fi
	;;
290
# x86_64-unknown-linux-gnu
291
    btc*)
292
293
        if  test "$COMP" = icc ; then
          ${CONFPATH}configure --prefix=$HOME/local \
294
295
296
                    --with-grib_api=/lustre/sw/rhel6-x64/grib_api/grib_api-1.13.0-intel15 \
	            --with-netcdf=/lustre/sw/rhel6-x64/netcdf/netcdf_c-4.3.2-intel15 \
                    --with-hdf5=/lustre/sw/rhel6-x64/hdf5/hdf5-1.8.14-threadsafe-intel15 \
297
                    --with-fftw3 \
298
	            CC=icc CFLAGS="-g -Wall -O2 -qopt-report=5 -xCORE-AVX2"
299
300
	else
          ${CONFPATH}configure --prefix=$HOME/local \
301
302
303
                    --with-grib_api=/lustre/sw/rhel6-x64/grib_api/grib_api-1.13.0-gcc48 \
	            --with-netcdf=/lustre/sw/rhel6-x64/netcdf/netcdf_c-4.3.2-gcc48 \
                    --with-hdf5=/lustre/sw/rhel6-x64/hdf5/hdf5-1.8.14-threadsafe-gcc48 \
304
305
306
                    --with-fftw3 \
                    CC=gcc CFLAGS='-g -Wall -O3 -march=native'
	fi
307
	;;
308
309
310
311
312
313
314
315
316
317
318
319
# 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"
	;;
320
# x86_64-archlinux
Ralf Mueller's avatar
Ralf Mueller committed
321
    luthien*)
322
323
      case "$COMP" in
      gcc|clang)
324
325
 	${CONFPATH}configure --prefix=$HOME/local \
                    --program-suffix=-dev \
326
                    --enable-maintainer-mode \
327
                    --enable-data \
328
	            --with-magics \
Ralf Mueller's avatar
Ralf Mueller committed
329
330
331
332
	            --with-netcdf \
	              --with-hdf5 \
                     --with-szlib \
                  --with-grib_api \
Ralf Mueller's avatar
Ralf Mueller committed
333
                  --with-udunits2 \
334
335
336
337
                  --with-grib_api \
                  --with-fftw3    \
                  --with-proj     \
                      --with-pic  \
338
                      CC=$COMP CPPFLAGS=-I/usr/include/magics CFLAGS="-g -Wall -O3" LIBS="-lopenjpeg" LDFLAGS='-lelf -v'
339
340
        ;;
      g++|clang++)
Ralf Mueller's avatar
Ralf Mueller committed
341
342
343
344
345
346
347
348
        case "$COMP" in
          g++)
            CC=gcc
            ;;
          clang++)
            CC=clang
            ;;
        esac
349
350
351
352
353
354
355
356
357
358
359
360
361
362
 	${CONFPATH}configure --prefix=$HOME/local \
                    --program-suffix=-dev \
                    --enable-maintainer-mode \
                    --enable-data \
                    --enable-cxx  \
	            --with-netcdf \
	              --with-hdf5 \
                     --with-szlib \
                  --with-grib_api \
                  --with-udunits2 \
                  --with-grib_api \
                  --with-fftw3    \
                  --with-proj     \
                      --with-pic  \
Ralf Mueller's avatar
Ralf Mueller committed
363
                      CC=$CC CXX=$COMP CFLAGS="-g -Wall -O2" CXXFLAGS="-g -Wall -O2" LIBS=-lopenjpeg
364
	;;
365
366
      esac
    ;;
Ralf Mueller's avatar
Ralf Mueller committed
367
368
# standard workstations at MPI-M debian jessie
    mpipc149)
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
      CDOLIBS="--prefix=`pwd`/build \
              --enable-maintainer-mode \
              --with-netcdf=/sw/jessie-x64/netcdf-4.3.3.1-gccsys \
              --with-hdf5=/sw/jessie-x64/hdf5-1.8.16-gccsys/ \
              --with-szlib=/sw/jessie-x64/szip-2.1-gccsys \
              --with-udunits2=/sw/jessie-x64/udunits-2.2.20-gccsys \
              --enable-ruby --enable-swig --enable-python "
      case "$COMP" in
        gcc)
          ${CONFPATH}configure \
            $CDOLIBS \
            CC=gcc CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O2" LIBS='-lm  -lpthread '
          ;;
        g++) # jessie used gcc 6.1.1
          ${CONFPATH}configure \
            $CDOLIBS \
            --enable-cxx \
386
            CC=gcc CXX=g++ CFLAGS="-std=c++11 -g -Wall -W -Wfloat-equal -pedantic -O2" LIBS='-lm  -lpthread '
387
388
389
390
391
392
          ;;
        clang)
          ${CONFPATH}configure \
            $CDOLIBS \
            --disable-openmp \
            CC=/sw/jessie-x64/util/clang+llvm-3.8.0/bin/clang CXX=/sw/jessie-x64/util/clang+llvm-3.8.0/bin/clang++
Ralf Mueller's avatar
Ralf Mueller committed
393
        ;;
394
395
396
397
398
399
400
401
402
        clang++) # recent clang-3.8
          ${CONFPATH}configure \
            $CDOLIBS \
            --disable-openmp \
            --enable-cxx \
            CC=/sw/jessie-x64/util/clang+llvm-3.8.0/bin/clang CXX=/sw/jessie-x64/util/clang+llvm-3.8.0/bin/clang++
        ;;
      esac
      ;;
403
404
405
406
407
# standard workstations at MPI-M x86_64-lenny
    mpipc* )
	${CONFPATH}configure \
               --prefix=`pwd`/build \
               --enable-maintainer-mode \
Ralf Mueller's avatar
Ralf Mueller committed
408
409
410
411
               --with-netcdf='/sw/squeeze-x64/netcdf-latest-gccsys' \
               --with-hdf5='/sw/squeeze-x64/hdf5-latest' \
               --with-szlib='/sw/squeeze-x64/szip-latest' \
               --with-proj='/sw/squeeze-x64/proj-latest' \
412
               --enable-ruby --enable-swig --enable-python \
413
	           CC=gcc CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O2"
414
        ;;
415
# dap enabled
416
    egmont | columbine)
417
418
419
 	  ${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 \
420
                    --with-szlib=/sw/etch-ia32/szip-2.1 \
421
                    --withroj=/sw/etch-ia32/proj-4.6.0 \
422
	            --enable-all-static CC=icc CFLAGS="-g -fast -openmp" AR=xiar LD=xild
423
#	            CC=gcc CFLAGS="-g -Wall -W -Wfloat-equal -pedantic -O2"
424
    ;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
425
# i386-pc-solaris2.10
Uwe Schulzweida's avatar
Uwe Schulzweida committed
426
    grim | mil* )
Uwe Schulzweida's avatar
Uwe Schulzweida committed
427
	${CONFPATH}configure --prefix=$HOME/local --exec_prefix=$HOME/local/solaris10-x86 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
428
                    --with-netcdf=/client \
429
                    --with-szlib=$HOME/local/solaris10-x86 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
430
431
432
433
                    CC=cc CFLAGS="-g -mt -fast"
	;;
# sx6-nec-superux12.2
    cs*)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
434
	${CONFPATH}configure --prefix=$HOME/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
435
         	    --with-netcdf=/pool/netcdf/netcdf-3.6.0-p1 \
436
		    CC=cc \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
437
438
439
                    CFLAGS="-O -Onooverlap,restrict=all -pvctl,fullmsg,noassume,loopcnt=1000000"
	;;
    sx6)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
440
	${CONFPATH}configure --host=sx6 --prefix=$HOME/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
441
                    --with-netcdf=/pool/SX-6/netcdf/netcdf-3.6.0-p1 \
442
		    CC=sxcc AR=sxar \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
443
444
445
                    CFLAGS="-O -Onooverlap,restrict=all -pvctl,fullmsg,noassume,loopcnt=1000000"
	;;
    es)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
446
	${CONFPATH}configure --host=sx6 --prefix=$HOME/local/ES \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
447
                    --with-netcdf=/S/n010/home010/c0148/local/SX \
448
		    CC=escc AR=esar \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
449
450
                    CFLAGS="-O -Onooverlap,restrict=all -pvctl,fullmsg,noassume,loopcnt=1000000"
	;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
451
# x86_64-unknown-linux-gnu (rhel55)
452
    wizard*)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
453
        LDFLAGS="-lpng"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
454
        export LDFLAGS
455
	${CONFPATH}configure --prefix=$HOME/local/centos58-x64 \
456
457
458
                    --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 \
459
                    --with-grib_api=/sw/centos58-x64/grib_api-1.12.3 \
460
461
                    --with-netcdf=/sw/centos58-x64/netcdf-4.2.1.1 \
                    --with-szlib=/sw/centos58-x64/szip-2.1 \
462
	            CC=gcc CFLAGS="-g -Wall -O3"
Uwe Schulzweida's avatar
Uwe Schulzweida committed
463
	;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
464
# powerpc-ibm-aix5.3.0.0
Uwe Schulzweida's avatar
Uwe Schulzweida committed
465
466
    blizzard*)
	${CONFPATH}configure --prefix=$HOME/local \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
467
468
469
                    --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 \
470
                    --with-udunits2=/sw/aix61/udunits-2.1.14 \
Uwe Schulzweida's avatar
Uwe Schulzweida committed
471
                    --with-proj=/sw/aix53/proj-4.6.1 \
472
                    --with-curl=/sw/aix61/curl-7.21.3 \
473
                    AR="ar -X 64"  LDFLAGS="-brtl -R/sw/aix61/openssl-1.0.0d/lib:/sw/aix61/zlib-1.2.6/lib" \
474
 	            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
475
	;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
476
# powerpc-ibm-aix6.0.0.0
477
    c1a*)
Uwe Schulzweida's avatar
Uwe Schulzweida committed
478
	${CONFPATH}configure --prefix=$HOME/local \
479
480
481
                    --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 \
482
                    AR="ar -X 64"  LDFLAGS="-brtl" \
483
	            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
484
485
486
487
	;;
    *)
	echo "configuration for hostname $HOSTNAME not found!"
	;;
488
489
490
491
492
493
494
495
# x86_64-unknown-linux-gnu (cray)
    brisi*)
        ${CONFPATH}configure  \
                    --with-netcdf=/opt/cray/netcdf/4.3.2/INTEL/140 \
                    --with-hdf5=/opt/cray/hdf5/1.8.13/INTEL/140 \
                    --with-fftw3 \
                    CC=gcc CFLAGS='-g -Wall -O3'
	;;
Uwe Schulzweida's avatar
Uwe Schulzweida committed
496
esac