4115 |
|
# Try to determine "good" native compiler flags if none specified on command |
4116 |
|
# line |
4117 |
|
|
4118 |
< |
if test x"$F90FLAGS" == x ; then |
4118 |
> |
if test x"$F90FLAGS" = x ; then |
4119 |
|
F90FLAGS="" |
4120 |
|
case "${host_cpu}-${host_os}" in |
4121 |
|
|
5388 |
|
rm -f conftest* |
5389 |
|
# Intel ifc compiler generates files by the name of work.pc and work.pcl (!) |
5390 |
|
rm -f work* |
5391 |
< |
cat >conftest.f <<EOF |
5391 |
> |
cat >conftest.f90 <<EOF |
5392 |
|
module conftest |
5393 |
|
integer n |
5394 |
|
parameter (n=1) |
5397 |
|
# SGI and absoft compilers generates module name in upper case! |
5398 |
|
testname="conftest" |
5399 |
|
modcase="lower" |
5400 |
< |
if $F90 -c conftest.f > conftest.out 2>&1 ; then |
5400 |
> |
if $F90 -c conftest.f90 > conftest.out 2>&1 ; then |
5401 |
|
MOD=`ls conftest* | grep -v conftest.f | grep -v conftest.o` |
5402 |
|
MOD=`echo "$MOD" | sed -e 's/conftest\.//g'` |
5403 |
|
if test -z "$MOD" ; then |
5439 |
|
# Use the module made above |
5440 |
|
echo "$as_me:$LINENO: checking for module directory path flag" >&5 |
5441 |
|
echo $ECHO_N "checking for module directory path flag... $ECHO_C" >&6 |
5442 |
< |
madedir=0 |
5443 |
< |
if test ! -d conf ; then mkdir conf ; madedir=1; fi |
5444 |
< |
cp $testname.$MOD conf |
5445 |
< |
rm -f conftest* CONFTEST* |
5446 |
< |
cat >conftest1.f <<EOF |
5442 |
> |
rm -f conftest* |
5443 |
> |
# Intel ifc compiler generates files by the name of work.pc and work.pcl (!) |
5444 |
> |
rm -f work* |
5445 |
> |
cat >conftest.f90 <<EOF |
5446 |
> |
module conftest |
5447 |
> |
integer n |
5448 |
> |
parameter (n=1) |
5449 |
> |
end module conftest |
5450 |
> |
EOF |
5451 |
> |
# SGI and absoft compilers generates module name in upper case! |
5452 |
> |
testname="conftest" |
5453 |
> |
if $F90 -c conftest.f90 > conftest.out 2>&1 ; then |
5454 |
> |
mod=`ls CONFTEST* 2>/dev/null | grep -v CONFTEST.f | grep -v CONFTEST.o` |
5455 |
> |
mod=`echo "$mod" | sed -e 's/CONFTEST\.//g'` |
5456 |
> |
if test -n "$mod" ; then |
5457 |
> |
testname="CONFTEST" |
5458 |
> |
fi |
5459 |
> |
madedir=0 |
5460 |
> |
if test ! -d conf ; then mkdir conf ; madedir=1; fi |
5461 |
> |
cp $testname.$MOD conf |
5462 |
> |
rm -f conftest* CONFTEST* |
5463 |
> |
cat >conftest1.f90 <<EOF |
5464 |
|
program main |
5465 |
|
use conftest |
5466 |
|
print *, n |
5467 |
|
end |
5468 |
|
EOF |
5469 |
< |
F90_WORK_FILES_ARG="" |
5470 |
< |
F90MODINCSPEC="" |
5471 |
< |
if $F90 -c -Iconf conftest1.f > conftest.out 2>&1 ; then |
5472 |
< |
MODDIRFLAG="-I" |
5473 |
< |
F90MODINCSPEC="-I<dir>" |
5474 |
< |
echo "$as_me:$LINENO: result: -I" >&5 |
5469 |
> |
F90_WORK_FILES_ARG="" |
5470 |
> |
F90MODINCSPEC="" |
5471 |
> |
if $F90 -c -Iconf conftest1.f90 > conftest.out 2>&1 ; then |
5472 |
> |
MODDIRFLAG="-I" |
5473 |
> |
F90MODINCSPEC="-I<dir>" |
5474 |
> |
echo "$as_me:$LINENO: result: -I" >&5 |
5475 |
|
echo "${ECHO_T}-I" >&6 |
5476 |
< |
elif $F90 -c -Mconf conftest1.f >> conftest.out 2>&1 ; then |
5477 |
< |
MODDIRFLAG="-M" |
5478 |
< |
F90MODINCSPEC="-M<dir>" |
5479 |
< |
echo "$as_me:$LINENO: result: -M" >&5 |
5476 |
> |
elif $F90 -c -Mconf conftest1.f90 >> conftest.out 2>&1 ; then |
5477 |
> |
MODDIRFLAG="-M" |
5478 |
> |
F90MODINCSPEC="-M<dir>" |
5479 |
> |
echo "$as_me:$LINENO: result: -M" >&5 |
5480 |
|
echo "${ECHO_T}-M" >&6 |
5481 |
< |
elif $F90 -c -pconf conftest1.f >> conftest.out 2>&1 ; then |
5482 |
< |
MODDIRFLAG="-p" |
5483 |
< |
F90MODINCSPEC="-p<dir>" |
5484 |
< |
echo "$as_me:$LINENO: result: -p" >&5 |
5481 |
> |
elif $F90 -c -pconf conftest1.f90 >> conftest.out 2>&1 ; then |
5482 |
> |
MODDIRFLAG="-p" |
5483 |
> |
F90MODINCSPEC="-p<dir>" |
5484 |
> |
echo "$as_me:$LINENO: result: -p" >&5 |
5485 |
|
echo "${ECHO_T}-p" >&6 |
5486 |
< |
elif test -s work.pc ; then |
5487 |
< |
cp work.pc conf/mpimod.pc |
5488 |
< |
echo "mpimod.pc" > conf/mpimod.pcl |
5489 |
< |
echo "`pwd`/conf/mpimod.pc" >> conf/mpimod.pcl |
5490 |
< |
if $F90 -c -cl,conf/mpimod.pcl conftest1.f >>conftest.out 2>&1 ; then |
5491 |
< |
MODDIRFLAG='-cl,mpimod.pcl' |
5492 |
< |
echo "$as_me:$LINENO: result: -cl,filename where filename contains a list of files and |
5493 |
< |
directories" >&5 |
5494 |
< |
echo "${ECHO_T}-cl,filename where filename contains a list of files and |
5495 |
< |
directories" >&6 |
5496 |
< |
F90_WORK_FILES_ARG="-cl,mpimod.pcl" |
5497 |
< |
F90MODINCSPEC="-cl,<dir>/<file>mod.pcl" |
5498 |
< |
|
5499 |
< |
else |
5500 |
< |
# The version of the Intel compiler that I have refuses to let |
5484 |
< |
# you put the "work catalog" list anywhere but the current directory. |
5485 |
< |
# For example, you cannot in |
5486 |
> |
elif test -s work.pc ; then |
5487 |
> |
cp work.pc conf/mpimod.pc |
5488 |
> |
echo "mpimod.pc" > conf/mpimod.pcl |
5489 |
> |
echo "`pwd`/conf/mpimod.pc" >> conf/mpimod.pcl |
5490 |
> |
if $F90 -c -cl,conf/mpimod.pcl conftest1.f >>conftest.out 2>&1 ; then |
5491 |
> |
MODDIRFLAG='-cl,mpimod.pcl' |
5492 |
> |
echo "$as_me:$LINENO: result: -cl,filename where filename contains a list of files and directories" >&5 |
5493 |
> |
echo "${ECHO_T}-cl,filename where filename contains a list of files and directories" >&6 |
5494 |
> |
F90_WORK_FILES_ARG="-cl,mpimod.pcl" |
5495 |
> |
F90MODINCSPEC="-cl,<dir>/<file>mod.pcl" |
5496 |
> |
|
5497 |
> |
else |
5498 |
> |
# The version of the Intel compiler that I have refuses to let |
5499 |
> |
# you put the "work catalog" list anywhere but the current |
5500 |
> |
# directory. For example, you cannot in |
5501 |
|
: |
5502 |
< |
fi |
5503 |
< |
fi |
5504 |
< |
if test -z "MODDIRFLAG" ; then |
5505 |
< |
echo "$as_me:$LINENO: result: unknown" >&5 |
5502 |
> |
fi |
5503 |
> |
fi |
5504 |
> |
if test -z "MODDIRFLAG" ; then |
5505 |
> |
echo "$as_me:$LINENO: result: unknown" >&5 |
5506 |
|
echo "${ECHO_T}unknown" >&6 |
5507 |
< |
fi |
5507 |
> |
fi |
5508 |
|
|
5509 |
|
|
5510 |
< |
rm -f conftest* conf/conftest* conf/CONFTEST* CONFTEST* conf/mpimod* |
5511 |
< |
if test $madedir = 1 ; then rmdir conf ; fi |
5510 |
> |
rm -f conftest* conf/conftest* conf/CONFTEST* CONFTEST* conf/mpimod* |
5511 |
> |
if test $madedir = 1 ; then rmdir conf ; fi |
5512 |
> |
fi |
5513 |
|
|
5514 |
|
|
5515 |
|
|