671 |
RET_C=$? |
RET_C=$? |
672 |
cat <<EOF > genmake_tc_2.$FS |
cat <<EOF > genmake_tc_2.$FS |
673 |
program hello |
program hello |
674 |
Real*8 wtime |
REAL*8 wtime |
675 |
external cloc |
external cloc |
676 |
call cloc(wtime) |
call cloc(wtime) |
677 |
print *," HELLO WORLD", wtime |
print *," HELLO WORLD", wtime |
678 |
end program hello |
end |
679 |
EOF |
EOF |
680 |
$FC $FFLAGS -o genmake_tc genmake_tc_2.$FS genmake_tc_1.o >> genmake_warnings 2>&1 |
$FC $FFLAGS -o genmake_tc genmake_tc_2.$FS genmake_tc_1.o >> genmake_warnings 2>&1 |
681 |
RET_F=$? |
RET_F=$? |
689 |
} |
} |
690 |
|
|
691 |
|
|
692 |
|
check_HAVE_SETRLSTK() { |
693 |
|
get_fortran_c_namemangling |
694 |
|
cat <<EOF > genmake_tc_1.c |
695 |
|
$FC_NAMEMANGLE |
696 |
|
#include <sys/time.h> |
697 |
|
#include <sys/resource.h> |
698 |
|
#include <unistd.h> |
699 |
|
void FC_NAMEMANGLE(setrlstk) () |
700 |
|
{ |
701 |
|
struct rlimit rls; |
702 |
|
rls.rlim_cur = RLIM_INFINITY; |
703 |
|
rls.rlim_max = RLIM_INFINITY; |
704 |
|
setrlimit(RLIMIT_STACK, &rls); |
705 |
|
return; |
706 |
|
} |
707 |
|
EOF |
708 |
|
make genmake_tc_1.o >> genmake_warnings 2>&1 |
709 |
|
RET_C=$? |
710 |
|
cat <<EOF > genmake_tc_2.$FS |
711 |
|
program hello |
712 |
|
external setrlstk |
713 |
|
call setrlstk() |
714 |
|
end |
715 |
|
EOF |
716 |
|
$FC $FFLAGS -o genmake_tc genmake_tc_2.$FS genmake_tc_1.o >> genmake_warnings 2>&1 |
717 |
|
RET_F=$? |
718 |
|
test -x ./genmake_tc && ./genmake_tc >> genmake_warnings 2>&1 |
719 |
|
RETVAL=$? |
720 |
|
if test "x$RETVAL" = x0 ; then |
721 |
|
HAVE_SETRLSTK=t |
722 |
|
DEFINES="$DEFINES -DHAVE_SETRLSTK" |
723 |
|
fi |
724 |
|
rm -f genmake_tc* |
725 |
|
} |
726 |
|
|
727 |
|
|
728 |
check_HAVE_STAT() { |
check_HAVE_STAT() { |
729 |
get_fortran_c_namemangling |
get_fortran_c_namemangling |
730 |
cat <<EOF > genmake_tc_1.c |
cat <<EOF > genmake_tc_1.c |
753 |
integer nbyte |
integer nbyte |
754 |
call tfsize(nbyte) |
call tfsize(nbyte) |
755 |
print *," HELLO WORLD", nbyte |
print *," HELLO WORLD", nbyte |
756 |
end program hello |
end |
757 |
EOF |
EOF |
758 |
$FC $FFLAGS -o genmake_tc genmake_tc_2.$FS genmake_tc_1.o >> genmake_tc.log 2>&1 |
$FC $FFLAGS -o genmake_tc genmake_tc_2.$FS genmake_tc_1.o >> genmake_tc.log 2>&1 |
759 |
RET_F=$? |
RET_F=$? |
880 |
HAVE_FDATE= |
HAVE_FDATE= |
881 |
FC_NAMEMANGLE= |
FC_NAMEMANGLE= |
882 |
HAVE_CLOC= |
HAVE_CLOC= |
883 |
|
HAVE_SETRLSTK= |
884 |
HAVE_STAT= |
HAVE_STAT= |
885 |
HAVE_NETCDF= |
HAVE_NETCDF= |
886 |
HAVE_ETIME= |
HAVE_ETIME= |
1375 |
printf " Do we have the fdate() command using $FC... " |
printf " Do we have the fdate() command using $FC... " |
1376 |
cat > genmake_tcomp.$FS <<EOF |
cat > genmake_tcomp.$FS <<EOF |
1377 |
program hello |
program hello |
1378 |
CHARACTER(128) string |
CHARACTER*(128) string |
1379 |
string = ' ' |
string = ' ' |
1380 |
call fdate( string ) |
call fdate( string ) |
1381 |
print *, string |
print *, string |
1424 |
fi |
fi |
1425 |
rm -f genmake_t* |
rm -f genmake_t* |
1426 |
|
|
1427 |
|
printf " Can we unlimit the stack size using $FC... " |
1428 |
|
check_HAVE_SETRLSTK |
1429 |
|
if test "x$HAVE_SETRLSTK" != x ; then |
1430 |
|
echo "yes" |
1431 |
|
else |
1432 |
|
echo "no" |
1433 |
|
fi |
1434 |
|
rm -f genmake_t* |
1435 |
|
|
1436 |
printf " Can we use stat() through C calls... " |
printf " Can we use stat() through C calls... " |
1437 |
check_HAVE_STAT |
check_HAVE_STAT |
1438 |
if test "x$HAVE_STAT" != x ; then |
if test "x$HAVE_STAT" != x ; then |
2087 |
cat ad_flow_files.inc >> $MAKEFILE |
cat ad_flow_files.inc >> $MAKEFILE |
2088 |
echo >> $MAKEFILE |
echo >> $MAKEFILE |
2089 |
echo 'F77FILES = $(SRCFILES:.F=.'$FS')' >> $MAKEFILE |
echo 'F77FILES = $(SRCFILES:.F=.'$FS')' >> $MAKEFILE |
2090 |
echo 'F90FILES = $(F90SRCFILES:.F=.'$FS90')' >> $MAKEFILE |
echo 'F90FILES = $(F90SRCFILES:.F90=.'$FS90')' >> $MAKEFILE |
2091 |
echo 'OBJFILES = $(SRCFILES:.F=.o) $(CSRCFILES:.c=.o) $(F90SRCFILES:.F90=.o)' >> $MAKEFILE |
echo 'OBJFILES = $(SRCFILES:.F=.o) $(CSRCFILES:.c=.o) $(F90SRCFILES:.F90=.o)' >> $MAKEFILE |
2092 |
echo >> $MAKEFILE |
echo >> $MAKEFILE |
2093 |
echo '.SUFFIXES:' >> $MAKEFILE |
echo '.SUFFIXES:' >> $MAKEFILE |