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 |
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 |
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 |
1421 |
echo "yes" |
echo "yes" |
1422 |
else |
else |
1423 |
echo "no" |
echo "no" |
1424 |
|
fi |
1425 |
|
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 |
fi |
1434 |
rm -f genmake_t* |
rm -f genmake_t* |
1435 |
|
|