7 FORTRAN_COMPILER_TIMER
=""
12 while [ $# -ge 1 ]; do
17 -h) print_usage
="yes" ;;
18 -help) print_usage
="yes" ;;
19 -os) shift ; WRF_OS
=$1 ;;
20 -mach) shift ; WRF_MACH
=$1 ;;
21 -time) shift ; FORTRAN_COMPILER_TIMER
=$1 ;;
24 radardfi
) WRF_DFI_RADAR
=1 ;;
25 wrfda
) wrf_core
=DA_CORE
;;
26 4dvar
) wrf_core
=4D_DA_CORE
;;
27 arw
) wrf_core
=EM_CORE
;;
28 nmm
) wrf_core
=NMM_CORE
;;
29 coamps
) wrf_core
=COAMPS_CORE
;;
30 exp
) wrf_core
=EXP_CORE
;;
31 titan
) WRF_TITAN
=1 ; break ;;
32 mars
) WRF_MARS
=1 ; break ;;
33 venus
) WRF_VENUS
=1 ; break ;;
37 if [ -n "$print_usage" ] ; then
38 echo usage
: $thiscmd '[-d|-s|-f|-os os|-mach mach|-time timecommand] [chem] [kpp]'
42 if `pwd | grep ' ' > /dev/null ` ; then
43 echo '************************** W A R N I N G ************************************'
44 echo The current working directory has spaces
in some components of its path name
45 echo and this may cause problems
for your build. This can occur
, for example
, on
46 echo Windows systems. It is strongly recommended that you
install WRF and other
47 echo related software such as NetCDF
in directories whose path names contain no
48 echo white space. On Win
, for example
, create and
install in a directory under C
:.
49 echo '*****************************************************************************'
53 # lifted from the configure file for mpich; 00/03/10 jm
55 # Check for perl and perl version
58 # Extract the first word of "$p", so it can be a program name with args.
59 set dummy
$p; ac_word
=$2
60 if test -z "$ac_echo_n" ; then
62 if (echo "testing\c"; echo 1,2,3) |
grep c
>/dev
/null
; then
63 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
64 if (echo -n testing
; echo 1,2,3) |
sed s
/-n/xn
/ |
grep xn
>/dev
/null
; then
73 ac_echo_test
=`echo foo 1>&1`
74 if test -z "$ac_echo_test" ; then
75 print_error
"Your sh shell does not handle the output redirection"
76 print_error
"1>&1 correctly. Configure will work around this problem,"
77 print_error
"but you should report the problem to your vendor."
80 if test -z "$ac_echo_test" -a 1 = 1 ; then
81 echo $ac_n "checking for $ac_word""... $ac_c"
83 echo $ac_n "checking for $ac_word""... $ac_c" 1>&1
86 if test -n "$PERL"; then
87 ac_pg_PERL
="$PERL" # Let the user override the test.
89 ac_first_char
=`expr "$p" : "\(.\)"`
90 if test "$ac_first_char" = "/" -a -x "$p" ; then
94 IFS
="${IFS= }"; ac_save_ifs
="$IFS"; IFS
="${IFS}:"
95 for ac_dir
in $PATH; do
96 test -z "$ac_dir" && ac_dir
=.
97 if test -f $ac_dir/$ac_word; then
99 ac_prog_where
=$ac_dir/$ac_word
105 fi;PERL
="$ac_pg_PERL"
106 if test -n "$ac_prog_where" ; then
107 if test -z "$ac_echo_test" -a 1 = 1 ; then
108 echo "$ac_t""found $ac_prog_where ($PERL)"
110 echo "$ac_t""found $ac_prog_where ($PERL)" 1>&1
112 PERLFULLPATH
=$ac_prog_where
114 if test -z "$ac_echo_test" -a 1 = 1 ; then
117 echo "$ac_t""no" 1>&1
120 test -n "$PERL" && break
123 if test -z "$PERL" ; then
124 # We have to set this outside of the loop lest the first failure in
125 # PROGRAM_CHECK set the value (which then terminates the effect of the
126 # loop, since autoconf macros only set values that are null, they
127 # don't override them
131 if test -n "$PERL" ; then
134 perlversion
=`$PERL -v | grep 'This is perl' | \
135 sed -e 's/^.*v[a-z ]*\([0-9]\).*$/\1/'`
137 # Should do a test first for ch_p4 etc.
138 if test "$perlversion" -lt 5 ; then
139 echo "WRF build requires perl version 5, which configure did not find."
140 echo "You can set the environment variable PERL to contain the "
141 echo "location of perl version 5."
142 echo "Configure believes that $PERL is version $perlversion ."
149 if test -z "$NETCDF" ; then
150 for p
in /usr
/local
/netcdf
158 if test -z "$NETCDF" ; then
160 if [ `hostname | cut -c 1-2` = "bs" -o \
161 `hostname | cut -c 1-2` = "bd" -o \
162 `hostname` = "tempest" -o `hostname` = "ute" ] ; then
163 echo 'Compiling on an NCAR system with weird paths to NetCDF'
164 echo 'Setting up a local NetCDF directory with symlinks'
165 if ( test -d .
/netcdf_links
) ; then
166 echo 'A directory ./netcdf_links already exists. Continuing.'
169 if [ -z "$OBJECT_MODE" ] ; then
173 if [ $OBJECT_MODE -ne 64 -a \
( `hostname | cut -c 1-2` = "bd" -o `hostname | cut -c 1-2` = "bs" \
) ] ; then
174 ( cd .
/netcdf_links
; ln -s /usr
/local
/lib32
/r4i4 .
/lib
; \
175 ln -s /usr
/local
/include .
/include
)
177 ( cd .
/netcdf_links
; ln -s /usr
/local
/lib64
/r4i4 .
/lib
; \
178 ln -s /usr
/local
/include .
/include
)
181 NETCDF
=`pwd`/netcdf_links
187 if [ -d .
/netcdf_links
] ; then
188 echo '** There is an existing ./netcdf_links file. Should I use? [y]'
190 if [ "$resp" = "y" ] ; then
191 NETCDF
=`pwd`/netcdf_links
194 echo 'Removing existing ./netcdf_links directory'
195 /bin
/rm -fr .
/netcdf_links
198 echo '** WARNING: No path to NETCDF and environment variable NETCDF not set.'
199 echo '** would you like me to try to fix? [y]'
203 while [ -z "$bedone" ] ; do
205 if [ "$resp" = "y" -o -z "$resp" ] ; then
206 if [ -d .
/netcdf_links
] ; then
207 echo 'There is already a ./netcdf_links directory. Okay to use links'
208 echo 'in this directory for NetCDF include and lib dirs? [y]'
210 if [ "$resp" = "y" ] ; then
211 NETCDF
=`pwd`/netcdf_links
217 if [ -z "$netcdfipath" ] ; then
218 echo 'Enter full path to NetCDF include directory on your system'
220 if [ ! -d "$resp" ] ; then
221 echo "invalid path: $resp. Try again? [y]" ; continue
225 if [ -z "$netcdflpath" ] ; then
226 echo 'Enter full path to NetCDF library directory on your system'
228 if [ ! -d "$resp" ] ; then
229 echo "invalid path: $resp. Try again? [y]" ; continue
234 if [ -n "$netcdflpath" -a -n "$netcdfipath" ] ; then
235 if [ -d .
/netcdf_links
] ; then
236 echo 'Existing ./netcdf_links directory. Okay to remove. [y]'
238 if [ "$resp" = "y" ] ; then
239 /bin
/rm -fr .
/netcdf_links
244 ln -s "$netcdfipath" include
245 ln -s "$netcdflpath" lib
247 echo created new .
/netcdf_links directory
248 /bin
/ls -lF .
/netcdf_links
249 NETCDF
=`pwd`/netcdf_links
260 if test -z "$PDHF5" ; then
261 if [ `hostname | cut -c 1-2` = "bb" -o `hostname | cut -c 1-2` = "bf" -o `hostname | cut -c 1-2` = "bs" -o \
262 `hostname` = "dataproc" -o `hostname` = "ute" ] ; then
263 if [ -d ~michalak
/hdf5pbin
] ; then
264 PHDF5
=~michalak
/hdf5pbin
267 if [ "$OBJECT_MODE" -eq 64 ] ; then
268 if [ -d ~michalak
/hdf5pbin-64
] ; then
269 PHDF5
=~michalak
/hdf5pbin-64
276 USENETCDFF
="" # see below
277 if [ -n "$NETCDF" ] ; then
278 echo "Will use NETCDF in dir: $NETCDF"
279 # for 3.6.2 and greater there might be a second library, libnetcdff.a . Check for this and use
281 if [ -f "$NETCDF/lib/libnetcdff.a" ] ; then
282 USENETCDFF
="-lnetcdff"
285 echo "Will configure for use without NetCDF"
288 if [ -n "$PNETCDF" ] ; then
289 echo "Will use PNETCDF in dir: $PNETCDF"
290 # experimental, so don't tease the user if it is not there
292 # echo "Will configure for use without NetCDF"
295 if [ -n "$PHDF5" ] ; then
296 echo "Will use PHDF5 in dir: $PHDF5"
298 echo "PHDF5 not set in environment. Will configure WRF for use without."
301 if [ "$wrf_core" = "DA_CORE" ]; then
302 if [ -n "$WRFPLUS_DIR" ] ; then
303 echo "To compile WRFDA without 4DVAR, please remove \$WRFPLUS_DIR from environment. "
308 if [ "$wrf_core" = "4D_DA_CORE" ]; then
309 if [ -n "$WRFPLUS_DIR" ] ; then
310 echo "Will use WRFPLUS in dir: $WRFPLUS_DIR"
312 echo "WRFPLUS_DIR not set in environment. Please compile WRFPLUS and set WRFPLUS_DIR."
316 # Users who are cross-compiling can set environment variable
317 # $WRF_OS to override the value normally obtained from `uname`.
318 # If $WRF_OS is set, then $WRF_MACH can also be set to override
319 # the value normally obtained from `uname -m`. If $WRF_OS is
320 # set and $WRF_MACH is not set, then $WRF_MACH defaults to "ARCH".
321 # If $WRF_OS is not set then $WRF_MACH is ignored.
322 if [ -n "$WRF_OS" ] ; then
323 echo "${0}: WRF operating system set to \"${WRF_OS}\" via environment variable \$WRF_OS"
326 if [ -n "$WRF_MACH" ] ; then
327 echo "${0}: WRF machine set to \"${WRF_MACH}\" via environment variable \$WRF_MACH"
331 # if the uname command exists, give it a shot and see if
332 # we can narrow the choices; otherwise, spam 'em
335 type uname
> /dev
/null
336 if [ $?
-eq 0 ] ; then
338 if [ "$os" = "AIX" -o "$os" = "IRIX" -o "$os" = "IRIX64" -o "$os" = "SunOS" -o "$os" = "HP-UX" -o "$os" = "Darwin" -o "$os" = "Interix" ] ; then
341 xxx
=`expr "$os" : '\(.........\).*'`
342 if [ "$xxx" = "CYGWIN_NT" ] ; then
345 if [ "$os" = "OSF1" -o "$os" = "Linux" -o "$os" = "UNICOS/mp" -o "$os" = "UNIX_System_V" -o "$os" = "CYGWIN_NT" ] ; then
347 if [ "$mach" = "ia64" -a -f /etc
/sgi-release
] ; then
358 # an IBM specific hack to adjust the bmaxstack and bmaxdata options if addressing is 32-bit
359 if [ "$os" = "AIX" ] ; then
360 if [ -z "$OBJECT_MODE" ] ; then
364 if [ "$OBJECT_MODE" = "32" ] ; then
365 # the bang means nothing to sh in this context; use to represent spaces (perl will unbang)
366 ldflags
=-bmaxstack:256000000!-bmaxdata:2048000000
370 # compile options that come from the environment, such as chemistry
371 # the "!" is removed by Config_new.pl
372 if [ -n "$WRF_MARS" ] ; then
373 if [ $WRF_MARS = 1 ] ; then
374 echo building WRF
for Mars
375 compileflags
="${compileflags}!-DPLANET!-DMARS"
380 if [ -n "$WRF_TITAN" ] ; then
381 if [ $WRF_TITAN = 1 ] ; then
382 echo building WRF
for Mars
383 compileflags
="${compileflags}!-DPLANET!-DTITAN"
387 if [ -n "$WRF_VENUS" ] ; then
388 if [ $WRF_VENUS = 1 ] ; then
389 echo building WRF
for Mars
390 compileflags
="${compileflags}!-DPLANET!-DVENUS"
393 if [ -n "$WRF_NMM_CORE" ]; then
394 if [ $WRF_NMM_CORE = 1 ]; then
395 if [ -n "$HWRF" ]; then
396 if [ $HWRF = 1 ]; then
397 echo building WRF with HWRF option
398 compileflags
="${compileflags}!-DHWRF=1"
399 if [ -n "$HWRFX" ]; then
400 if [ $HWRFX = 1 ]; then
401 compileflags
="${compileflags}!-DHWRFX=1"
408 if [ -n "$WRF_DFI_RADAR" ] ; then
409 if [ $WRF_DFI_RADAR = 1 ] ; then
410 echo building WRF with radar dfi option
411 compileflags
="${compileflags}!-DWRF_DFI_RADAR=1"
414 if [ -n "$WRF_CHEM" ] ; then
415 if [ $WRF_CHEM = 1 ] ; then
416 echo building WRF with chemistry option
417 compileflags
="${compileflags}!-DWRF_CHEM!-DBUILD_CHEM=1"
418 if [ -n "$WRF_KPP" ] ; then
419 if [ $WRF_KPP = 1 ] ; then
420 echo building WRF with KPP chemistry option
421 compileflags
="${compileflags}!-DWRF_KPP"
425 compileflags
="${compileflags} "
428 compileflags
="${compileflags} "
431 if [ `which timex` ] ; then
432 FORTRAN_COMPILER_TIMER
=timex
435 # Found perl, so proceed with configuration
436 if test -n "$PERL" ; then
437 srch
=`grep -i "^#ARCH.*$os" arch/configure_new.defaults | grep -i "$mach"`
438 if [ -n "$srch" ] ; then
439 $PERL arch
/Config_new.pl
-dmparallel=$COMMLIB -ompparallel=$OMP -perl=$PERL \
440 -netcdf=$NETCDF -pnetcdf=$PNETCDF -phdf5=$PHDF5 -os=$os -mach=$mach -ldflags=$ldflags \
441 -compileflags=$compileflags -opt_level=$opt_level -USENETCDFF=$USENETCDFF -time=$FORTRAN_COMPILER_TIMER \
443 if test ! -f configure.wrf
; then
446 if [ "$opt_level" = "-d" ] ; then
447 sed -e 's/FCOPTIM[ ]*=/& # /' -e '/FCDEBUG[ ]*=/s/#//g' configure.wrf
> configure.wrf.edit
448 /bin
/mv configure.wrf.edit configure.wrf
451 WRF_OS
=$os ; export WRF_OS
452 WRF_MACH
=$mach ; export WRF_MACH
453 echo '*** Configuration not found in configure_new.defaults; checking configure_old.defaults ***'
455 # see if we still have an old setting laying around from v2
456 if [ "$opt_level" = "-d" ] ; then
457 arch
/config_old
$opt_level
465 # new feb 2005. test whether MPI-2
466 if test -f configure.wrf
; then
467 grep 'DMPARALLEL *= *1' configure.wrf
> /dev
/null
469 echo testing
for MPI_Comm_f2c and MPI_Comm_c2f
470 /bin
/rm -f tools
/mpi2_test
471 ( make mpi2_test
2> /dev
/null
) 1> /dev
/null
472 if test -e tools
/mpi2_test.o
; then
473 echo " " MPI_Comm_f2c and MPI_Comm_c2f are supported
474 sed '/^DM_CC.*=/s/$/ -DMPI2_SUPPORT/' configure.wrf
> xx$$
; /bin
/mv xx$$ configure.wrf
475 if [ `hostname | cut -c 1-2` = "be" ] ; then
476 sed '/^ARCH_LOCAL.*=/s/$/ -DUSE_MPI_IN_PLACE/' configure.wrf
> xx$$
; /bin
/mv xx$$ configure.wrf
479 echo " " MPI_Comm_f2c and MPI_Comm_c2f are not supported
481 grep 'OMPCPP *= *-D_OPENMP' configure.wrf
> /dev
/null
483 echo testing
for MPI_Init_thread
484 /bin
/rm -f tools
/mpi2_thread_test
485 ( make mpi2_thread_test
2> /dev
/null
) 1> /dev
/null
486 if test -e tools
/mpi2_thread_test.o
; then
487 echo " " MPI_Init_thread is supported
488 sed '/^DM_CC.*=/s/$/ -DMPI2_THREAD_SUPPORT/' configure.wrf
> xx$$
; /bin
/mv xx$$ configure.wrf
490 echo " " MPI_Init_thread is not supported
494 # new dec 2005. test what fseek is supported (needed for share/landread.c to work correctly)
495 echo testing
for fseeko and fseeko64
496 /bin
/rm -f tools
/fseeko_test tools
/fseeko64_test
497 ( make fseek_test
2> /dev
/null
) 1> /dev
/null
498 if [ "$os" = "Darwin" ] ; then
499 # fseeko64 does not exist under Darwin fseeko does. Remove the 0 length executable
500 # file that might get generated anyway, even though the compiler complains about missing reference.
501 /bin
/rm -f tools
/fseeko64_test
503 if test -x tools
/fseeko64_test
; then
504 ( tools
/fseeko64_test
2> /dev
/null
) 1> /dev
/null
506 echo fseeko64 is supported
507 sed '/^CC .*=/s/$/ -DFSEEKO64_OK /' configure.wrf
> xx$$
; /bin
/mv xx$$ configure.wrf
510 if test -x tools
/fseeko_test
; then
511 ( tools
/fseeko_test
2> /dev
/null
) 1> /dev
/null
513 echo fseeko is supported and handles
64 bit offsets
514 sed '/^CC .*=/s/$/ -DFSEEKO_OK /' configure.wrf
> xx$$
; /bin
/mv xx$$ configure.wrf
516 echo neither fseeko64 nor fseeko with
64 bit offsets works
, landread will be compiled with fseek
517 echo but may not work correctly
for very high resolution terrain datasets
520 echo neither fseeko64 nor fseeko with
64 bit offsets works
, landread will be compiled with fseek
521 echo but may not work correctly
for very high resolution terrain datasets
526 echo "------------------------------------------------------------------------"
527 sed -e '1,/#### Architecture specific settings ####/d' -e '/^externals/,$d' configure.wrf
529 echo "------------------------------------------------------------------------"
530 echo "Settings listed above are written to configure.wrf."
531 echo "If you wish to change settings, please edit that file."
532 echo "If you wish to change the default options, edit the file:"
533 echo " arch/configure_new.defaults"
535 if test -n "$NETCDF" ; then
536 grep nf_format_64bit
$NETCDF/include
/netcdf.inc
> /dev
/null
537 configure_aaaa
=$?
; export configure_aaaa
538 if [ $configure_aaaa -a -z "$WRFIO_NCD_LARGE_FILE_SUPPORT" ] ; then
539 echo "NetCDF users note:"
540 echo " This installation of NetCDF supports large file support. To enable large file"
541 echo " support in NetCDF, set the environment variable WRFIO_NCD_LARGE_FILE_SUPPORT"
542 echo " to 1 and run configure again. Set to any other value to avoid this message."
547 if [ "$wrf_core" = "DA_CORE" -o "$wrf_core" = "4D_DA_CORE" ]; then
548 if [ "`grep '^SFC' configure.wrf | grep -i 'gfortran'`" != "" ]; then
549 echo "WRFDA using gfortran needs realsize=8"
550 sed -e '/^PROMOTION.*=/s/#//' configure.wrf
> configure.wrf.edit
551 /bin
/mv configure.wrf.edit configure.wrf
555 #Checking cross-compiling capability for some particular environment
556 #on Linux and Mac box
558 if [ $os = "Linux" -o $os = "Darwin" ]; then
560 SFC
=`grep '^SFC' configure.wrf | awk '{print $3}'`
561 SCC
=`grep '^SCC' configure.wrf | awk '{print $3}'`
562 CCOMP
=`grep '^CCOMP' configure.wrf | awk '{print $3}'`
564 SFC
="`type $SFC 2>/dev/null | awk '{print $NF}' | sed -e 's/(//g;s/)//g'`"
565 SCC
="`type $SCC 2>/dev/null | awk '{print $NF}' | sed -e 's/(//g;s/)//g'`"
566 CCOMP
="`type $CCOMP 2>/dev/null | awk '{print $NF}' | sed -e 's/(//g;s/)//g'`"
568 if [ -e $NETCDF/lib
/libnetcdf.a
-a "$SFC" != "" -a "$SCC" != "" -a "$CCOMP" != "" ]; then
578 echo Testing
for NetCDF
, C and Fortran compiler
582 int main(int argc, char ** argv)
590 integer :: STATUS = 0
592 end program test_exit
595 ar p
$NETCDF/lib
/libnetcdf.a nc.o
> ${foo}.o
596 netcdf_arch
="`file ${foo}.o | grep -o -E '[0-9]{2}-bit|i386'`"
599 $SFC -o ${foo} ${foo}.f
> /dev
/null
2>&1
600 SFC_arch
="`file ${foo} | grep -o -E '[0-9]{2}-bit|i386'`"
601 rm ${foo} ${foo}.o
2> /dev
/null
603 $SCC -o ${foo} ${foo}.c
> /dev
/null
2>&1
604 SCC_arch
="`file ${foo} | grep -o -E '[0-9]{2}-bit|i386'`"
606 rm ${foo} ${foo}.o
2> /dev
/null
608 if [ "$SCC" != "$CCOMP" ]; then
609 $CCOMP -o ${foo} ${foo}.c
> /dev
/null
2>&1
610 CCOMP_arch
="`file ${foo} | grep -o -E '[0-9]{2}-bit|i386'`"
611 rm ${foo} ${foo}.o
2> /dev
/null
614 if [ "$SFC_arch" = "" -o "$SCC_arch" = "" -o "$CCOMP_arch" = "" ]; then
615 echo " One of compilers testing failed!"
616 echo " Please check your compiler"
618 rm -f ${foo} ${foo}.
[cfo
] 2> /dev
/null
621 cp configure.wrf configure.wrf.edit
628 if [ "$SFC_arch" = "64-bit" ] ; then
630 $SFC -m32 -o ${foo} ${foo}.f
> /dev
/null
2>&1
633 sed '/^SFC.*=/s/$/ -m32/' configure.wrf.edit
> configure.wrf.tmp
634 mv configure.wrf.tmp configure.wrf.edit
637 if [ "$SCC_arch" = "64-bit" ] ; then
639 $SCC -m32 -o ${foo} ${foo}.c
> /dev
/null
2>&1
642 sed '/^SCC.*=/s/$/ -m32/' configure.wrf.edit
> configure.wrf.tmp
643 mv configure.wrf.tmp configure.wrf.edit
647 if [ "$CCOMP_arch" = "64-bit" ] ; then
649 if [ "$CCOMP" != "$SCC" ]; then
650 $CCOMP -m32 -o ${foo} ${foo}.c
> /dev
/null
2>&1
653 sed '/^CCOMP/ s/$/ -m32/' configure.wrf.edit
> configure.wrf.tmp
654 mv configure.wrf.tmp configure.wrf.edit
658 sed '/^CCOMP/ s/$/ -m32/' configure.wrf.edit
> configure.wrf.tmp
659 mv configure.wrf.tmp configure.wrf.edit
663 if [ $CROSS_COMPILING -eq 1 ] ; then
665 echo This installation NetCDF is
32-bit
666 if [ \
( $SFC_MULTI_ABI -ne 1 -a "$SFC_arch" = "64-bit" \
) \
667 -o \
( $SCC_MULTI_ABI -ne 1 -a "$SCC_arch" = "64-bit" \
) \
668 -o \
( $CCOMP_MULTI_ABI -ne 1 -a "$CCOMP_arch" = "64-bit" \
) ] ; then
669 rm configure.wrf.edit
670 echo One of compilers is
64-bit and doesn
\'t support cross-compiling.
671 echo Please check your NETCDF lib and compiler
673 echo -m32 is appended to configure.wrf
674 echo It will be forced to build
in 32-bit.
675 echo If you don
\'t want
32-bit binaries
, please use
64-bit NetCDF
, and re-run the configure
script.
682 if [ "$SFC_arch" = "32-bit" -o "$SFC_arch" = "i386" ] ; then
684 $SFC -m64 -o ${foo} ${foo}.f
> /dev
/null
2>&1
687 sed '/^SFC.*=/s/$/ -m64/' configure.wrf.edit
> configure.wrf.tmp
688 mv configure.wrf.tmp configure.wrf.edit
691 if [ "$SCC_arch" = "32-bit" -o "$SCC_arch" = "i386" ] ; then
693 $SCC -m64 -o ${foo} ${foo}.c
> /dev
/null
2>&1
696 sed '/^SCC.*=/s/$/ -m64/' configure.wrf.edit
> configure.wrf.tmp
697 mv configure.wrf.tmp configure.wrf.edit
701 if [ "$CCOMP_arch" = "32-bit" -o "$CCOMP_arch" = "i386" ] ; then
703 if [ "$CCOMP" != "$SCC" ]; then
704 $CCOMP -m64 -o ${foo} ${foo}.c
> /dev
/null
2>&1
707 sed '/^CCOMP/ s/$/ -m64/' configure.wrf.edit
> configure.wrf.tmp
708 mv configure.wrf.tmp configure.wrf.edit
712 sed '/^CCOMP/ s/$/ -m64/' configure.wrf.edit
> configure.wrf.tmp
713 mv configure.wrf.tmp configure.wrf.edit
717 if [ $CROSS_COMPILING -eq 1 ] ; then
719 echo This installation NetCDF is
64-bit
720 if [ \
( $SFC_MULTI_ABI -ne 1 -a "$SFC_arch" != "64-bit" \
) \
721 -o \
( $SCC_MULTI_ABI -ne 1 -a "$SCC_arch" != "64-bit" \
) \
722 -o \
( $CCOMP_MULTI_ABI -ne 1 -a "CCOMP_arch" != "64-bit" \
) ]; then
723 rm configure.wrf.edit
724 echo One of Compilers is
32-bit and doesn
\'t support cross-compiling.
725 echo Please check your NetCDF lib and compiler
727 echo -m64 is appended to configure.wrf
728 echo It will be forced to build
in 64-bit.
729 echo If you don
\'t want
64-bit binaries
, please use
32-bit NetCDF
, and re-run the configure
script.
735 if [ -e configure.wrf.edit
]; then
736 mv configure.wrf.edit configure.wrf
739 rm -f ${foo} ${foo}.
[cfo
] 2> /dev
/null
741 if [ $CROSS_COMPILING -eq 0 ] ; then
742 echo This installation NetCDF is
$netcdf_arch
743 echo C compiler is
$SCC_arch
744 echo Fortran compiler is
$SFC_arch
745 echo It will build
in $netcdf_arch