Hello Ralf, Here is a revised patch. I changed the recognition of the Sun compilers, and the whole_archive_flag_spec and postdeps, so that now all 112 tests PASS.
> > With this patch, the FAILs are turned into PASS; all tests PASS or SKIP. > > Which ones skip? Good question. I had many SKIPs, but this was either because I had forgotten to copy a recent config.guess, or because I did ./configure make make check - not knowing that after modifying libtool.m4, a simple "make" does not update the aclocal.m4 and configure files in the subdirectories; now I do ./configure make make dist make check and it works much better! 2006-05-09 Bruno Haible <[EMAIL PROTECTED]> * libtool.m4 (AC_LIBTOOL_LANG_CXX_CONFIG, AC_LIBTOOL_POSTDEP_PREDEP): Add support for Sun C++ 5.9 on Linux. (AC_LIBTOOL_PROG_COMPILER_PIC): Add support for Sun C 5.9 and Sun C++ 5.9. (AC_LIBTOOL_PROG_LD_SHLIBS): Add support for Sun C 5.9. *** libtool-1.5.22/libtool.m4.bak 2005-12-18 22:53:17.000000000 +0100 --- libtool-1.5.22/libtool.m4 2006-05-09 03:55:44.000000000 +0200 *************** *** 3353,3358 **** --- 3353,3379 ---- # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; + *) + if LC_ALL=C $CC -V 2>&1 | sed 1q | grep "Sun C" > /dev/null; then + # Sun C++ 5,9 + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' + + # Not sure whether something based on + # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 + # would be better. + output_verbose_link_cmd='echo' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + fi + ;; esac ;; lynxos*) *************** *** 3872,3877 **** --- 3893,3905 ---- _LT_AC_TAGVAR(postdeps,$1)= ;; + linux*) + if LC_ALL=C $CC -V 2>&1 | sed 1q | grep "Sun C" > /dev/null; then + # Sun C++ 5.9 + _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun' + fi + ;; + solaris*) case $cc_basename in CC*) *************** *** 4991,4996 **** --- 5019,5030 ---- _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) + if LC_ALL=C $CC -V 2>&1 | sed 1q | grep "Sun C" > /dev/null; then + # Sun C++ 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + fi ;; esac ;; *************** *** 5237,5242 **** --- 5271,5284 ---- # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; + *) + if LC_ALL=C $CC -V 2>&1 | sed 1q | grep "Sun C" > /dev/null; then + # Sun C 5.9 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + fi + ;; esac ;; *************** *** 5547,5559 **** ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ ! $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no --- 5589,5607 ---- ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac ! if LC_ALL=C $CC -V 2>&1 | sed 1q | grep "Sun C" > /dev/null; then ! # Sun C 5.9 ! tmp_sharedflag='-G' ! else ! tmp_sharedflag='-shared' ! fi ! _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ ! $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no _______________________________________________ Bug-libtool mailing list Bug-libtool@gnu.org http://lists.gnu.org/mailman/listinfo/bug-libtool