Index: libltdl/m4/libtool.m4 =================================================================== RCS file: /cvsroot/libtool/libtool/libltdl/m4/libtool.m4,v retrieving revision 1.77 diff -u -p -r1.77 libtool.m4 --- libltdl/m4/libtool.m4 2 Aug 2006 13:35:30 -0000 1.77 +++ libltdl/m4/libtool.m4 3 Aug 2006 13:45:41 -0000 @@ -6343,15 +6343,14 @@ linux*) # 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 + suncpp_use_stlport4=yes ;; esac - if test "$solaris_use_stlport4" != yes; then - _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + if test "$suncpp_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac @@ -6363,7 +6362,20 @@ solaris*) # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. - _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. + case " $CXX $CXXFLAGS " in + *" -library=stlport4 "*) + suncpp_use_stlport4=yes + ;; + esac + + if test "$suncpp_use_stlport4" != yes; then + _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' + fi ;; esac ;;