Index: libltdl/m4/libtool.m4 =================================================================== RCS file: /cvsroot/libtool/libtool/libltdl/m4/libtool.m4,v retrieving revision 1.76 diff -u -p -r1.76 libtool.m4 --- libltdl/m4/libtool.m4 28 Jul 2006 17:01:05 -0000 1.76 +++ libltdl/m4/libtool.m4 1 Aug 2006 16:58:11 -0000 @@ -6338,7 +6338,21 @@ linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 - _LT_TAGVAR(postdeps,$1)='-lCstd -lCrun' + + # The more standards-conforming stlport4 library is + # incompatible with the Cstd library. Avoid specifying + # it if it's in CXXFLAGS. Ignore libCrun as + # -library=stlport4 depends on it. + for cc_flag in $CXXFLAGS; do + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + solaris_use_stlport4=yes + ;; + esac + + if test "$solaris_use_stlport4" != yes; then + _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi ;; esac ;;