1
#-----------------------------------------------------------------------------
6
# This file defines environment variables used by HDFEOS5.
7
# This version is for use under the Korn shell (ksh).
10
# This file should be called from your .profile file with the line:
12
# . <HDFEOS5-home-dir>/bin/hdfeos_env.ksh
14
# where <HDFEOS5-home-dir> is the full path of the HDFEOS5 home directory.
17
# Mike Sucher / A.R.C.
18
# Guru Tej S. Khalsa / Applied Research Corporation
19
# Abe Taaheri / Emergent Information Technologies, Inc.
22
# 1) This file is compatible with the following platforms:
23
# Sun, SGI, HP-9000, IBM RS-6000 and DEC Alpha.
24
# It automatically figures out which platform you are on,
25
# and sets environment variables accordingly.
26
# 2) This file defines a variable called hdfeos5_path which contains
27
# all the directories likely to be needed on a given machine
28
# type, including the HDFEOS5 bin directories. Users
29
# may choose to set their path variable with:
31
# PATH=<user-path-additions>:$hdfeos5_path
34
# where <user-path-additions> is an optional list of other
35
# directories added to the search path.
38
# 17-Jun-1996 MES Initial version
39
# 11-Apr-2001 AT Modified for HDF5
41
#-----------------------------------------------------------------------------
43
: ${sgi_mode:=32} # by default, SGI mode is standard 32-bit
45
: ${hdfeos5_f90_comp:=""} # by default, no FORTRAN-90 compiler
47
: ${hdfeos5_nag_flag:=0} # by default, not using NAG FORTRAN-90
49
: ${use_flavor:=0} # by default, not using "flavor"
51
: ${opt_flag:=-O} # by default, optimizing code
55
user_path=$PATH # save user path
57
# set path to a base subset of directories, allowing startup on unknown host
58
# note: once the host has been determined the path is appropriately customized
60
PATH=/usr/local/bin:/bin:/usr/bin:/etc:/usr/etc:/usr/ucb:/usr/bin/X11
63
# get operating system type, login name
64
# special cases: SCO and Cray - uname works differently,
66
MACHINE="`uname -m | awk '{print $1}'`" # needed on Cray & SCO
85
CYGPL="`uname | awk -F_ '{print $1}'`"
87
# Intel Macintosh is also i386 or i686 (?) machine
89
if [ "$MACHINE" = "i386" ] ; then
90
if [ "$temp_ostype" = "Darwin" ] ; then
93
if [ "$CYGPL" = "CYGWIN" ] ; then
97
if [ "$MACHINE" = "i686" ] ; then
98
if [ "$temp_ostype" = "Darwin" ] ; then
101
if [ "$CYGPL" = "CYGWIN" ] ; then
105
if [ "`uname -m | awk '{print $1}'`" = "x86_64" ] || [ "`uname -m | awk '{print $1}'`" = "ia64" ] ; then
106
if [ "$LINUX_BRAND" = "" ] ; then
107
echo " Error: In 64-bit linux platform the env. variable LINUX_BRAND must be set to linux32 or linux64 before running this script."
112
user=`id | cut -d\( -f2 | cut -d\) -f1`
113
LOGNAME=$user # make sure $LOGNAME is defined
114
USER=$LOGNAME # make sure $USER is defined
117
# set machine-dependent environment variables:
118
# HOST the host name of this machine
119
# BRAND used by other achitecture-specific code
120
# PATH the execution search path
125
PATH=/usr/local/bin:/bin:/usr/bin:/etc:/usr/etc:/usr/ucb:/usr/bin/X11:/usr/sbin
131
PATH=/usr/local/bin:/bin:/usr/bin:/etc:/usr/bin/X11
137
PATH=/usr/local/bin:/bin:/usr/bin:/etc:/usr/etc:/usr/bsd:/usr/sbin
144
* ) BRAND=sgi ;; # just in case
149
PATH=/usr/local/bin:/bin:/usr/bin:/etc:/usr/etc:/usr/bsd:/usr/sbin
156
* ) BRAND=sgi ;; # just in case
161
PATH=/usr/local/bin:/bin:/usr/bin:/etc:/usr/etc:/usr/X11/bin
164
if [ "$LINUX_BRAND" = "linux64" ] ; then
166
elif [ "$LINUX_BRAND" = "linux32" ] ; then
168
elif [ "$LINUX_BRAND" = "linux" ] ; then
174
PATH=/bin:/sbin:/usr/bin:/usr/sbin
180
PATH=/bin:/sbin:/usr/bin:/usr/sbin
186
PATH=/bin:/sbin:/usr/bin:/usr/sbin
192
PATH=/usr/local/bin:/bin:/usr/bin:/etc:/usr/etc:/usr/ucb:/usr/bin/X11:/usr/sbin
198
PATH=/usr/local/bin:/bin:/usr/bin:/etc:/usr/bin/X11
204
# distinguish between SunOS 5.5/5.8 and 4.x versions
205
if [ `uname -r | awk -F. '{print $1}'` = "5" ] ; then
206
if [ `uname -r | awk -F. '{print $2}'` = "8" ] ; then
207
BRAND="sun5.8" # Solaris 8
208
elif [ `uname -r | awk -F. '{print $2}'` = "9" ] ; then
209
BRAND="sun5.9" # Solaris 9
210
elif [ `uname -r | awk -F. '{print $2}'` = "10" ] ; then
211
BRAND="sun5.10" # Solaris 10
213
BRAND="sun5" # release V5.5 SunOS
215
PATH=/usr/local/bin:/opt/SUNWspro/bin:/bin:/usr/bin:/etc:/usr/etc:/usr/ucb:/usr/openwin/bin:/usr/openwin/demo:/usr/ccs/bin:/usr/sbin
217
BRAND="sun4" # release V4.x SunOS
218
PATH=/usr/local/bin:/usr/local/lang:/usr/lang:/bin:/usr/bin:/etc:/usr/etc:/usr/ucb:/usr/openwin/demo
224
PATH=/usr/local/bin:/bin:/usr/bin:/etc:/usr/bin/X11
230
echo "Operating system: $OSTYPE not supported"
231
echo "This release of HDFEOS5 supports: "
232
echo " Sun, SGI HP-9000 IBM-6000 DEC-Alpha and Cray/Unicos "
237
export PATH HOST BRAND
240
# set machine-dependent compilers and compilation switches:
244
NSL_FLAG="" # this is nil on all but Sun platforms
245
NSL_LIB="" # this is nil on all but Sun platforms
251
CFLAGS="$opt_flag -DH5_USE_16_API" # default C flags (optimize, ansi)
252
C_CFH="-DCRAYFortran" # C/cfortran.h called from FORTRAN
253
CFHFLAGS="$CFLAGS $C_CFH" # CFLAGS + C_CFH
254
C_F77_CFH="$C_CFH" # calling FORTRAN
255
C_F77_LIB="" # FORTRAN lib called by C main
256
F77=cf77 # FORTRAN compiler
257
F77FLAGS="" # common FORTRAN flags
258
F77_CFH="" # FORTRAN callable from C w/ cfortran.h
259
F77_C_CFH="$F77_CFH" # calling C w/ cfortran.h
260
CFH_F77="$F77_C_CFH" # old version of F77_C_CFH
261
F77_C_LIB="" # C lib called by FORTRAN main
262
HDFSYS=UNICOS # system type as defined by HDF5
263
MACHINE=CRAY # system type as defined by HDFEOS5
268
CFLAGS="$opt_flag -std -DH5_USE_16_API" # default C flags (optimize, ansi)
269
C_CFH="-DDECFortran" # C w/ cfortran.h callable from FORTRAN
270
CFHFLAGS="$CFLAGS $C_CFH" # CFLAGS + C_CFH
271
C_F77_CFH="$C_CFH -Dmain=MAIN__" # calling FORTRAN
272
C_F77_LIB="" # FORTRAN lib called by C main
273
F77=f77 # FORTRAN compiler
274
F77FLAGS="" # common FORTRAN flags
275
F77_CFH="" # FORTRAN callable from C w/ cfortran.h
276
F77_C_CFH="$F77_CFH " # calling C w/ cfortran.h
277
CFH_F77="$F77_C_CFH" # old version of F77_C_CFH
278
F77_C_LIB="" # C lib called by FORTRAN main
279
HDFSYS=DEC_ALPHA # system type as defined by HDF5
280
MACHINE=DEC # system type as defined by HDFEOS5
285
CFLAGS="$opt_flag -Ae -DH5_USE_16_API" # default C flags (optimize, ansi)
286
C_CFH="" # C w/ cfortran.h callable from FORTRAN
287
CFHFLAGS="$CFLAGS $C_CFH" # CFLAGS + C_CFH
288
C_F77_CFH="$C_CFH" # calling FORTRAN
289
C_F77_LIB="" # FORTRAN lib called by C main
290
F77=fort77 # FORTRAN compiler
291
F77FLAGS="" # common FORTRAN flags
292
F77_CFH="" # FORTRAN callable from C w/ cfortran.h
293
F77_C_CFH="$F77_CFH" # calling C w/ cfortran.h
294
CFH_F77="$F77_C_CFH" # old version of F77_C_CFH
295
F77_C_LIB="" # C lib called by FORTRAN main
296
HDFSYS=HP9000 # system type as defined by HDF5
297
MACHINE=HP # system type as defined by HDFEOS5
302
CFLAGS="$opt_flag -qlanglvl=ansi -DH5_USE_16_API" # default C flags (optimize, ansi)
303
C_CFH="" # C w/ cfortran.h callable from FORTRAN
304
CFHFLAGS="$CFLAGS $C_CFH" # CFLAGS + C_CFH
305
C_F77_CFH="$C_CFH" # calling FORTRAN
306
C_F77_LIB="" # FORTRAN lib called by C main FORTAN
307
F77=xlf # FORTRAN compiler
308
F77FLAGS="" # common FORTRAN flags
309
F77_CFH="" # FORTRAN callable from C w/ cfortran.h
310
F77_C_CFH="$F77_CFH" # calling C w/ cfortran.h
311
CFH_F77="$F77_C_CFH" # old version of F77_C_CFH
312
F77_C_LIB="" # C lib called by FORTRAN main
313
HDFSYS=IBM6000 # system type as defined by HDF5
314
MACHINE=IBM # system type as defined by HDFEOS5
317
linux | linux32 | linux64)
318
CC="gcc LNX_CMP_FLAG" # C compiler
319
CFLAGS="$opt_flag -ansi -DH5_USE_16_API" # default C flags (optimize, ansi)
320
C_CFH="-Df2cFortran" # C w/ cfortran.h callable from FORTRAN
321
CFHFLAGS="$CFLAGS $C_CFH" # CFLAGS + C_CFH
322
C_F77_CFH="$C_CFH" # calling FORTRAN
323
C_F77_LIB="" # FORTRAN lib called by C main
324
F77="g77 LNX_CMP_FLAG" # FORTRAN compiler
325
F77FLAGS="" # common FORTRAN flags
326
F77_CFH="" # FORTRAN callable from C w/ cfortran.h
327
F77_C_CFH="$F77_CFH" # calling C w/ cfortran.h
328
CFH_F77="$F77_C_CFH" # old version of F77_C_CFH
329
F77_C_LIB="" # C lib called by FORTRAN main
330
HDFSYS=LINUX # system type as defined by HDF5
331
if [ `/bin/uname -m` = "x86_64" ]; then
332
if [ "$BRAND" = "linux32" ] || [ "$BRAND" = "linux" ] ; then
333
HDFSYS=LINUX # system type as defined by HDF
335
HDFSYS=LINUX64 # Only for 64 bit linux
337
elif [ `/bin/uname -m` = "ia64" ]; then
338
if [ "$BRAND" = "linux32" ] || [ "$BRAND" = "linux" ] ; then
339
HDFSYS=LINUX # system type as defined by HDF
341
HDFSYS=IA64 #Only for IA64
344
HDFSYS=LINUX # system type as defined by HDF
347
MACHINE=LINUX # system type as defined by HDFEOS5
352
CFLAGS="$opt_flag -ansi -DH5_USE_16_API" # default C flags (optimize, ansi)
353
C_CFH="-Df2cFortran" # C w/ cfortran.h callable from FORTRAN
354
CFHFLAGS="$CFLAGS $C_CFH" # CFLAGS + C_CFH
355
C_F77_CFH="$C_CFH" # calling FORTRAN
356
C_F77_LIB="" # FORTRAN lib called by C main
357
F77="g77" # FORTRAN compiler
358
F77FLAGS="" # common FORTRAN flags
359
F77_CFH="" # FORTRAN callable from C w/ cfortran.h
360
F77_C_CFH="$F77_CFH" # calling C w/ cfortran.h
361
CFH_F77="$F77_C_CFH" # old version of F77_C_CFH
362
F77_C_LIB="" # C lib called by FORTRAN main
363
HDFSYS=MACINTOSH # system type as defined by HDF5
364
MACHINE=MACINTOSH # system type as defined by HDFEOS5
369
CFLAGS="$opt_flag -ansi -DH5_USE_16_API" # default C flags (optimize, ansi)
370
C_CFH="-Df2cFortran" # C w/ cfortran.h callable from FORTRAN
371
CFHFLAGS="$CFLAGS $C_CFH" # CFLAGS + C_CFH
372
C_F77_CFH="$C_CFH" # calling FORTRAN
373
C_F77_LIB="" # FORTRAN lib called by C main
374
F77="gfortran" # FORTRAN compiler
375
F77FLAGS="" # common FORTRAN flags
376
F77_CFH="" # FORTRAN callable from C w/ cfortran.h
377
F77_C_CFH="$F77_CFH" # calling C w/ cfortran.h
378
CFH_F77="$F77_C_CFH" # old version of F77_C_CFH
379
F77_C_LIB="" # C lib called by FORTRAN main
380
HDFSYS=MACINTEL # system type as defined by HDF
381
MACHINE=MACINTEL # system type as defined by HDFEOS
386
CFLAGS="$opt_flag -ansi -DH5_USE_16_API" # default C flags (optimize, ansi)
387
C_CFH="-Df2cFortran" # C w/ cfortran.h callable from FORTRAN
388
CFHFLAGS="$CFLAGS $C_CFH" # CFLAGS + C_CFH
390
F77FLAGS="$opt_flag -fno-second-underscore" # common FORTRAN flags
391
F77_CFH="-fno-second-underscore" # FORTRAN callable from C w/cfortran.h
392
F77_C_CFH="" # calling C w/ cfortran.h
393
F77_C_LIB="" # C lib called by FORTRAN main
394
HDFSYS=CYGWIN # system type as defined by HDF
395
MACHINE=CYGWIN # system type as defined by HDFEOS
400
CFLAGS="$opt_flag -posix -DH5_USE_16_API" # default C flags (optimize, ansi)
401
C_CFH="-Df2cFortran" # C w/ cfortran.h callable from FORTRAN
402
CFHFLAGS="$CFLAGS $C_CFH" # CFLAGS + C_CFH
403
C_F77_CFH="$C_CFH" # calling FORTRAN
404
C_F77_LIB="" # FORTRAN lib called by C main
405
F77="" # FORTRAN compiler
406
F77FLAGS="" # common FORTRAN flags
407
F77_CFH="" # FORTRAN callable from C w/ cfortran.h
408
F77_C_CFH="$F77_CFH" # calling C w/ cfortran.h
409
CFH_F77="$F77_C_CFH" # old version of F77_C_CFH
410
F77_C_LIB="" # C lib called by FORTRAN main
411
HDFSYS=SCO # system type as defined by HDF5
412
MACHINE=SCO # system type as defined by HDFEOS5
416
if [ $OSTYPE = "IRIX64" ]
418
CC="cc -32" # C compiler (32 bit)
419
F77="f77 -32" # FORTRAN compiler (32 bit)
422
F77=f77 # FORTRAN compiler
424
CFLAGS="$opt_flag -xansi -D_POSIX_SOURCE -DH5_USE_16_API" # default C flags (optimize, ansi)
425
C_CFH="" # C w/ cfortran.h callable from FORTRAN
426
CFHFLAGS="$CFLAGS $C_CFH" # CFLAGS + C_CFH
427
C_F77_CFH="$C_CFH" # calling FORTRAN
428
C_F77_LIB="-lI77 -lU77 -lF77" # FORTRAN lib called by C main
429
F77FLAGS="" # common FORTRAN flags
430
F77_CFH="" # FORTRAN callable from C w/ cfortran.h
431
F77_C_CFH="$F77_CFH" # calling C w/ cfortran.h
432
CFH_F77="$F77_C_CFH" # old version of F77_C_CFH
433
F77_C_LIB="" # C lib called by FORTRAN main
434
HDFSYS=IRIS4 # system type as defined by HDF5
435
MACHINE=SGI # system type as defined by HDFEOS5
439
CC="cc -n32" # C compiler (new-style 32 bit)
440
F77="f77 -n32" # FORTRAN compiler (new-style 32 bit)
441
CFLAGS="$opt_flag -xansi -D_POSIX_SOURCE -DH5_USE_16_API" # default C flags (optimize, ansi)
442
C_CFH="" # C w/ cfortran.h callable from FORTRAN
443
CFHFLAGS="$CFLAGS $C_CFH" # CFLAGS + C_CFH
444
C_F77_CFH="$C_CFH" # calling FORTRAN
445
C_F77_LIB="-lI77 -lU77 -lF77" # FORTRAN lib called by C main
446
F77FLAGS="" # common FORTRAN flags
447
F77_CFH="" # FORTRAN callable from C w/ cfortran.h
448
F77_C_CFH="$F77_CFH" # calling C w/ cfortran.h
449
CFH_F77="$F77_C_CFH" # old version of F77_C_CFH
450
F77_C_LIB="" # C lib called by FORTRAN main
451
HDFSYS=IRIS4 # system type as defined by HDF5
452
MACHINE=SGI # system type as defined by HDFEOS5
456
CC="cc -n32" # C compiler (new-style 32 bit)
457
F77="f77 -n32" # FORTRAN compiler (new-style 32 bit)
458
CFLAGS="$opt_flag -xansi -D_POSIX_SOURCE -DH5_USE_16_API" # default C flags (optimize, ansi)
459
C_CFH="" # C w/ cfortran.h callable from FORTRAN
460
CFHFLAGS="$CFLAGS $C_CFH" # CFLAGS + C_CFH
461
C_F77_CFH="$C_CFH" # calling FORTRAN
462
C_F77_LIB="-lI77 -lU77 -lF77" # FORTRAN lib called by C main
463
F77FLAGS="" # common FORTRAN flags
464
F77_CFH="" # FORTRAN callable from C w/ cfortran.h
465
F77_C_CFH="$F77_CFH" # calling C w/ cfortran.h
466
CFH_F77="$F77_C_CFH" # old version of F77_C_CFH
467
F77_C_LIB="" # C lib called by FORTRAN main
468
HDFSYS=IRIS4 # system type as defined by HDF5
469
MACHINE=SGI # system type as defined by HDFEOS5
473
cpu_type=`hinv | fgrep CPU | head -1 | cut -d' ' -f3 | cut -b2`
474
if [ "$cpu_type" = "4" ] ; then
475
CC="cc -64 -mips3" # C compiler (R4?00 chip)
476
F77="f77 -64 -mips3" # FORTRAN compiler (R4?00 chip)
478
CC="cc -64" # C compiler
479
F77="f77 -64" # FORTRAN compiler
481
CFLAGS="$opt_flag -xansi -D_POSIX_SOURCE -DH5_USE_16_API" # default C flags (optimize, ansi)
482
C_CFH="" # C w/ cfortran.h callable from FORTRAN
483
CFHFLAGS="$CFLAGS $C_CFH" # CFLAGS + C_CFH
484
C_F77_CFH="$C_CFH" # calling FORTRAN
485
C_F77_LIB="-lI77 -lU77 -lF77" # FORTRAN lib called by C main
486
F77FLAGS="" # common FORTRAN flags
487
F77_CFH="" # FORTRAN callable from C w/ cfortran.h
488
F77_C_CFH="$F77_CFH" # calling C w/ cfortran.h
489
CFH_F77="$F77_C_CFH" # old version of F77_C_CFH
490
F77_C_LIB="" # C lib called by FORTRAN main
491
HDFSYS=IRIS4 # system type as defined by HDF5
492
MACHINE=SGI # system type as defined by HDFEOS5
497
CFLAGS="$opt_flag -Xa -DH5_USE_16_API" # default C flags (optimize, ansi)
498
C_CFH="-DsunFortran" # C w/ cfortran.h callable from FORTRAN
499
CFHFLAGS="$CFLAGS $C_CFH" # CFLAGS + C_CFH
500
C_F77_CFH="$C_CFH" # calling FORTRAN
501
C_F77_LIB="" # FORTRAN lib called by C main
502
F77=f77 # FORTRAN compiler
503
F77FLAGS="" # common FORTRAN flags
504
F77_CFH="" # FORTRAN callable from C w/ cfortran.h
505
F77_C_CFH="$F77_CFH" # calling C w/ cfortran.h
506
CFH_F77="$F77_C_CFH" # old version of F77_C_CFH
507
F77_C_LIB="-lm" # C lib called by FORTRAN main
508
HDFSYS=SUN # system type as defined by HDF5
509
MACHINE=SUN4 # system type as defined by HDFEOS5
510
NSL_FLAG="-lnsl" # this is nil on all but Sun platforms
511
NSL_LIB="/usr/lib/libnsl.a" # this is nil on all but Sun platforms
516
CFLAGS="$opt_flag -Xa -DH5_USE_16_API" # default C flags (optimize, ansi)
517
C_CFH="-DsunFortran" # C w/ cfortran.h callable from FORTRAN
518
CFHFLAGS="$CFLAGS $C_CFH" # CFLAGS + C_CFH
519
C_F77_CFH="$C_CFH" # calling FORTRAN
520
C_F77_LIB="" # FORTRAN lib called by C main
521
F77=f77 # FORTRAN compiler
522
F77FLAGS="" # common FORTRAN flags
523
F77_CFH="" # FORTRAN callable from C w/ cfortran.h
524
F77_C_CFH="$F77_CFH" # calling C w/ cfortran.h
525
CFH_F77="$F77_C_CFH" # old version of F77_C_CFH
526
F77_C_LIB="-lm" # C lib called by FORTRAN main
527
HDFSYS=SUN # system type as defined by HDF5
528
MACHINE=SUN5 # system type as defined by HDFEOS5
529
NSL_FLAG="-lnsl" # this is nil on all but Sun platforms
530
NSL_LIB="/usr/lib/libnsl.a" # this is nil on all but Sun platforms
535
CFLAGS="$opt_flag -Xa -DH5_USE_16_API" # default C flags (optimize, ansi)
536
C_CFH="-DsunFortran" # C w/ cfortran.h callable from FORTRAN
537
CFHFLAGS="$CFLAGS $C_CFH" # CFLAGS + C_CFH
538
C_F77_CFH="$C_CFH" # calling FORTRAN
539
C_F77_LIB="" # FORTRAN lib called by C main
540
F77=f77 # FORTRAN compiler
541
F77FLAGS="" # common FORTRAN flags
542
F77_CFH="" # FORTRAN callable from C w/ cfortran.h
543
F77_C_CFH="$F77_CFH" # calling C w/ cfortran.h
544
CFH_F77="$F77_C_CFH" # old version of F77_C_CFH
545
F77_C_LIB="-lm" # C lib called by FORTRAN main
546
HDFSYS=SUN # system type as defined by HDF5
547
MACHINE=SUN8 # system type as defined by HDFEOS5
548
NSL_FLAG="-lnsl" # this is nil on all but Sun platforms
549
NSL_LIB="/usr/lib/libnsl.a" # this is nil on all but Sun platforms
554
CFLAGS="$opt_flag -Xa -DH5_USE_16_API" # default C flags (optimize, ansi)
555
C_CFH="-DsunFortran" # C w/ cfortran.h callable from FORTRAN
556
CFHFLAGS="$CFLAGS $C_CFH" # CFLAGS + C_CFH
557
C_F77_CFH="$C_CFH" # calling FORTRAN
558
C_F77_LIB="" # FORTRAN lib called by C main
559
F77=f77 # FORTRAN compiler
560
F77FLAGS="" # common FORTRAN flags
561
F77_CFH="" # FORTRAN callable from C w/ cfortran.h
562
F77_C_CFH="$F77_CFH" # calling C w/ cfortran.h
563
CFH_F77="$F77_C_CFH" # old version of F77_C_CFH
564
F77_C_LIB="-lm" # C lib called by FORTRAN main
565
HDFSYS=SUN # system type as defined by HDF5
566
MACHINE=SUN9 # system type as defined by HDFEOS5
567
NSL_FLAG="-lnsl" # this is nil on all but Sun platforms
568
NSL_LIB="/usr/lib/libnsl.a" # this is nil on all but Sun platforms
573
CFLAGS="$opt_flag -Xa -DH5_USE_16_API" # default C flags (optimize, ansi)
574
C_CFH="-DsunFortran" # C w/ cfortran.h callable from FORTRAN
575
CFHFLAGS="$CFLAGS $C_CFH" # CFLAGS + C_CFH
576
C_F77_CFH="$C_CFH" # calling FORTRAN
577
C_F77_LIB="" # FORTRAN lib called by C main
578
F77=f77 # FORTRAN compiler
579
F77FLAGS="" # common FORTRAN flags
580
F77_CFH="" # FORTRAN callable from C w/ cfortran.h
581
F77_C_CFH="$F77_CFH" # calling C w/ cfortran.h
582
CFH_F77="$F77_C_CFH" # old version of F77_C_CFH
583
F77_C_LIB="-lm" # C lib called by FORTRAN main
584
HDFSYS=SUN # system type as defined by HDF5
585
MACHINE=SUN10 # system type as defined by HDFEOS5
586
NSL_FLAG="-lnsl" # this is nil on all but Sun platforms
587
NSL_LIB="/usr/lib/libnsl.a" # this is nil on all but Sun platforms
592
CFLAGS="$opt_flag -DH5_USE_16_API" # default C flags (optimize)
593
C_CFH="" # C w/ cfortran.h callable from FORTRAN
594
CFHFLAGS="$CFLAGS $C_CFH" # CFLAGS + C_CFH
595
C_F77_CFH="$C_CFH" # calling FORTRAN
596
C_F77_LIB="" # FORTRAN lib called by C main
597
F77=f77 # FORTRAN compiler
598
F77FLAGS="" # common FORTRAN flags
599
F77_CFH="" # FORTRAN callable from C w/ cfortran.h
600
F77_C_CFH="$F77_CFH" # calling C w/ cfortran.h
601
CFH_F77="$F77_C_CFH" # old version of F77_C_CFH
602
F77_C_LIB="-lm" # C lib called by FORTRAN main
603
HDFSYS=unknown # system type as defined by HDF5
604
MACHINE=unknown # system type as defined by HDFEOS5
609
export NSL_FLAG NSL_LIB
611
export CC CFLAGS C_CFH CFHFLAGS C_F77_CFH C_F77_LIB F77
612
export F77FLAGS F77_CFH F77_C_CFH CFH_F77 F77_C_LIB HDFSYS
616
# set up environment to handle FORTRAN-90 compiler
619
if [ "$hdfeos5_f90_comp" != "" ] ; then # using FORTRAN-90
621
F77="$hdfeos5_f90_comp"
623
if [ "$hdfeos5_nag_flag" = "1" ] ; then # using NAG f90
624
C_CFH="$C_CFH -DNAGf90F"
625
CFHFLAGS="$CFLAGS $C_CFH"
628
export CFHFLAGS C_CFH F77
633
# copy the machine-specific path to variable hdfeos5_path
637
# set HDFEOS5-related environment variables
638
# these may be referred to in makefiles and on compiler command lines
640
if [ "$HDFEOS5_HOME" != "" ] ; then
642
# set up base set of HDFEOS5_ Toolkit directory variables.
644
HDFEOS5_BIN=${HDFEOS5_HOME}/bin/$BRAND # executable files
645
HDFEOS5_INC=$HDFEOS5_HOME/include # include header files
646
HDFEOS5_LIB=${HDFEOS5_HOME}/lib/$BRAND # library files
647
HDFEOS5_OBJ=${HDFEOS5_HOME}/obj/$BRAND # object files
648
HDFEOS5_SRC=$HDFEOS5_HOME/src # HDFEOS5 source files
650
if [ $use_flavor = 1 ] ; then
651
if [ "$opt_flag" = "-g" ] ; then
653
HDFEOS5_LIB=${HDFEOS5_LIB}_debug
654
HDFEOS5_OBJ=${HDFEOS5_OBJ}_debug
655
HDFEOS5_BIN=${HDFEOS5_BIN}_debug
657
hdf5lib=`echo $HDF5LIB | sed "s/${BRAND}/${BRAND}_debug/"`
658
if [ -d $hdf5lib ] ; then
662
hdf5inc=`echo $HDF5INC | sed "s/${BRAND}/${BRAND}_debug/"`
663
if [ -d $hdf5inc ] ; then
670
export HDFEOS5_HOME HDFEOS5_BIN HDFEOS5_DAT HDFEOS5_INC HDFEOS5_LIB
671
export HDFEOS5_MSG HDFEOS5_OBJ HDFEOS5_RUN HDFEOS5_SRC HDFEOS5_TST
673
# update path variables
675
PATH=$PATH:$HDFEOS5_BIN; export PATH # add HDFEOS5_BIN to path
676
hdfeos5_path=$hdfeos5_path:$HDFEOS5_BIN # add HDFEOS5_BIN to hdfeos5 path
677
user_path=$user_path:$HDFEOS5_BIN # add HDFEOS5_BIN to user path
682
echo "You must first set the environment variable HDFEOS5_HOME"
689
# restore augmented user path
691
PATH=$user_path ; export PATH