Index: configure.ac =================================================================== --- configure.ac (revision 19845) +++ configure.ac (working copy) @@ -1071,6 +1076,12 @@ ompi_show_subtitle "Libtool configuration" +# Use the undocumented solaris_use_stlport4 libtool variable to turn off any +# Cstd/stlport4 linkage. This allows Open MPI to be C++ STL agnostic. +if test "x$ompi_cv_c_compiler_vendor" = "xsun"; then + solaris_use_stlport4="yes" +fi + dnl Not all versions of LT set the PACKAGE_VERSION m4_ifdef([LT_PACKAGE_VERSION], [], [m4_define([LT_PACKAGE_VERSION], [1.5.22])]) Index: autogen.sh =================================================================== --- autogen.sh (revision 19845) +++ autogen.sh (working copy) @@ -541,6 +541,12 @@ aclocal.m4 > aclocal.m4.new cp aclocal.m4.new aclocal.m4 rm -f aclocal.m4.new + + # This patch fixes a bug in Libtool's detection of the Sun Studio + # Fortran compiler. See the below e-mail thread for more details: + # http://www.open-mpi.org/community/lists/devel/2008/11/4920.php + echo " ++ patching for Sun Studio Fortran compilers" + patch -N -p0 < config/lt-sun-fortran.diff > /dev/null 2>&1 fi run_and_check $ompi_autoconf Index: config/lt-sun-fortran.diff =================================================================== --- config/lt-sun-fortran.diff (revision 0) +++ config/lt-sun-fortran.diff (revision 0) @@ -0,0 +1,26 @@ +--- config/libtool.m4.orig ++++ config/libtool.m4 +@@ -3947,17 +3947,17 @@ m4_if([$1], [CXX], [ + ;; + *) + case `$CC -V 2>&1 | sed 5q` in +- *Sun\ C*) +- # Sun C 5.9 ++ *Sun\ F* | *Sun*Fortran*) ++ # Sun Fortran 8.3 passes all unrecognized flags to the linker + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + ;; +- *Sun\ F*) +- # Sun Fortran 8.3 passes all unrecognized flags to the linker ++ *Sun\ C*) ++ # Sun C 5.9 + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' +- _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + ;; + esac + ;;