Re: Portland Fortran compiler changing executable name

2009-11-15 Thread Ralf Wildenhues
[ dropping bug-libtool, adding autoconf-patches ]

* Jeff Squyres wrote on Sat, Nov 14, 2009 at 04:11:13PM CET:
 If it matters, as I understand it, the name pgfortran is meant to
 symbolize that the compiler now supports things beyond Fortran 90 --
 it supports Fortran 95 and some Fortran 03 (and beyond?) features.
 So I don't know if you want to update the comment that specifically
 states F77 and F90 or not...

That comment is not all that important.  But it might be useful to test
for it in AC_PROG_FC.

OK to commit this untested patch?

Thanks,
Ralf

Add pgfortran to list of Fortran 95+ compilers.

* lib/autoconf/fortran.m4 (_AC_F95_FC): Add pgfortran before
pgf95.
Based on report by Jeff Squyres.

diff --git a/lib/autoconf/fortran.m4 b/lib/autoconf/fortran.m4
index f5918d0..3239a6e 100644
--- a/lib/autoconf/fortran.m4
+++ b/lib/autoconf/fortran.m4
@@ -306,7 +306,7 @@ AC_DEFUN([_AC_FC_DIALECT_YEAR],
 #  cf77: native F77 compiler under older Crays (prefer over fort77)
 #  fort77: native F77 compiler under HP-UX (and some older Crays)
 #  frt: Fujitsu F77 compiler
-#  pgf77/pgf90/pghpf/pgf95: Portland Group F77/F90/F95 compilers
+#  pgf77/pgf90/pghpf/pgf95/pgfortran: Portland Group F77/F90/F95 compilers
 #  xlf/xlf90/xlf95: IBM (AIX) F77/F90/F95 compilers
 #Prefer xlf9x to the generic names because they do not reject file
 #with extension `.f'.
@@ -317,7 +317,7 @@ AC_DEFUN([_AC_FC_DIALECT_YEAR],
 #  fort: Compaq (now HP) Fortran 90/95 compiler for Tru64 and Linux/Alpha
 #  ifort, previously ifc: Intel Fortran 95 compiler for Linux/x86
 #  efc: Intel Fortran 95 compiler for IA64
-m4_define([_AC_F95_FC], [gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 
ftn])
+m4_define([_AC_F95_FC], [gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran 
pgf95 lf95 ftn])
 m4_define([_AC_F90_FC], [xlf90 f90 pgf90 pghpf epcf90])
 m4_define([_AC_F77_FC], [g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77])
 AC_DEFUN([_AC_PROG_FC],




Re: Portland Fortran compiler changing executable name

2009-11-14 Thread Jeff Squyres

Thanks Ralf!

If it matters, as I understand it, the name pgfortran is meant to  
symbolize that the compiler now supports things beyond Fortran 90 --  
it supports Fortran 95 and some Fortran 03 (and beyond?) features.  So  
I don't know if you want to update the comment that specifically  
states F77 and F90 or not...



On Nov 14, 2009, at 2:35 AM, Ralf Wildenhues wrote:


Hi Jeff,

* Jeff Squyres wrote on Wed, Nov 11, 2009 at 09:45:53PM CET:
 Could Libtool be adjusted now to look for the pgfortran name first
 for all Fortran variants, and if not found, fall back to the old
 names?  That would seem to give flexibility for the future.

That name doesn't seem to be problematic, can't see any other use of  
it

out there.  I'm pushing this patch.

Thanks,
Ralf

Recognize `pgfortran' as Portland compiler.

* libltdl/m4/libtool.m4 (_LT_COMPILER_PIC, _LT_LINKER_SHLIBS):
Accept `pgfortran*' too.
Report by Jeff Squyres.

diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index 206940e..1f58a38 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -4042,7 +4042,7 @@ m4_if([$1], [CXX], [
_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
;;
-  pgcc* | pgf77* | pgf90* | pgf95*)
+  pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
 # Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
@@ -4454,7 +4454,8 @@ _LT_EOF
  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole- 
archive`for conv in $convenience\\; do test  -n \$conv\   
new_convenience=\$new_convenience,$conv\; done; func_echo_all  
\$new_convenience\` ${wl}--no-whole-archive'

  tmp_addflag=' $pic_flag'
  ;;
-   pgf77* | pgf90* | pgf95*)   # Portland Group f77 and f90  
compilers

+   pgf77* | pgf90* | pgf95* | pgfortran*)
+   # Portland Group f77 and f90  
compilers
  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole- 
archive`for conv in $convenience\\; do test  -n \$conv\   
new_convenience=\$new_convenience,$conv\; done; func_echo_all  
\$new_convenience\` ${wl}--no-whole-archive'

  tmp_addflag=' $pic_flag -Mnomain' ;;
ecc*,ia64* | icc*,ia64*)# Intel C compiler on ia64




--
Jeff Squyres
jsquy...@cisco.com