libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 10/10] Fix a problem that it fails to find proper libraries if .l


From: KO Myung-Hun
Subject: [PATCH 10/10] Fix a problem that it fails to find proper libraries if .la is a dependency on OS/2
Date: Fri, 15 Apr 2011 21:59:23 +0900

---
 libltdl/config/ltmain.m4sh |  103 +++++++++++++++++++++++++++++++++----------
 1 files changed, 79 insertions(+), 24 deletions(-)

diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 9052a9d..19b816a 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -5457,33 +5457,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 "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; 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=no
-                   func_dirname "$lib" "" "."
-                   ladir="$func_dirname_result"
-                   lib=$ladir/$old_library
-                   if test "$linkmode,$pass" = "prog,link"; then
-                     compile_deplibs="$deplib $compile_deplibs"
-                     finalize_deplibs="$deplib $finalize_deplibs"
-                   else
-                     deplibs="$deplib $deplibs"
-                     test "$linkmode" = lib && 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=no
+                     func_dirname "$lib" "" "."
+                     ladir="$func_dirname_result"
+                     lib=$ladir/$old_library
+                     if test "$linkmode,$pass" = "prog,link"; then
+                       compile_deplibs="$deplib $compile_deplibs"
+                       finalize_deplibs="$deplib $finalize_deplibs"
+                     else
+                       deplibs="$deplib $deplibs"
+                       test "$linkmode" = lib && 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=no
+                     func_dirname "$lib" "" "."
+                     ladir="$func_dirname_result"
+                     lib=$ladir/$old_library
+                     if test "$linkmode,$pass" = "prog,link"; then
+                       compile_deplibs="$deplib $compile_deplibs"
+                       finalize_deplibs="$deplib $finalize_deplibs"
+                     else
+                       deplibs="$deplib $deplibs"
+                       test "$linkmode" = lib && newdependency_libs="$deplib 
$newdependency_libs"
+                     fi
+                     continue
+                   fi
+                 fi
+                 ;;
+               *) ;;
+               esac
+               ;;
+             esac # case $host_os in
            fi
          fi
          ;; # -l
@@ -6313,6 +6346,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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]