--- build-aux/ltmain.m4sh | 103 +++++++++++++++++++++++++++++++++++++----------- 1 files changed, 79 insertions(+), 24 deletions(-)
diff --git a/build-aux/ltmain.m4sh b/build-aux/ltmain.m4sh index 690b44b..c721be2 100644 --- a/build-aux/ltmain.m4sh +++ b/build-aux/ltmain.m4sh @@ -5479,33 +5479,66 @@ func_mode_link () # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test yes = "$allow_libtool_libs_with_static_runtimes"; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll=$l - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=false - func_dirname "$lib" "" "." - ladir=$func_dirname_result - lib=$ladir/$old_library - if test prog,link = "$linkmode,$pass"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + case $host_os in + os2*) + case " $predeps $postdeps " in + *" $deplib "*) ;; + *) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=false + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + lib=$ladir/$old_library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue fi - continue fi - fi + ;; + esac ;; - *) ;; - esac + *) + case " $predeps $postdeps " in + *" $deplib "*) + if func_lalib_p "$lib"; then + library_names= + old_library= + func_source "$lib" + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=false + func_dirname "$lib" "" "." + ladir="$func_dirname_result" + lib=$ladir/$old_library + if test prog,link = "$linkmode,$pass"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + ;; + esac # case $host_os in fi else # deplib doesn't seem to be a libtool library @@ -6343,6 +6376,28 @@ func_mode_link () fi fi ;; + *-*-os2*) + depdepl= + deplibrary_names= + if test "$build_old_libs" != yes && test "$link_static" != yes ; then + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + fi + if test -z "$deplibrary_names" ; then + # fall back to static library + eval deplibrary_names=`${SED} -n -e 's/^old_library=\(.*\)$/\1/p' $deplib` + fi + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$absdir/$objdir/$depdepl" ; then + depdepl="$absdir/$objdir/$depdepl" + compiler_flags="$compiler_flags $depdepl" + linker_flags="$linker_flags $depdepl" + fi + fi + path= + ;; *) path=-L$absdir/$objdir ;; -- 1.7.3.2