[Top][All Lists]
[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: |
Thu, 14 Apr 2011 23:06:14 +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
- [PATCH 00/10] Enhanced OS/2 ports, KO Myung-Hun, 2011/04/15
- [PATCH 01/10] Add -shortname option., KO Myung-Hun, 2011/04/15
- [PATCH 02/10] Don't eliminate duplications in $postdeps and $predeps on OS/2, KO Myung-Hun, 2011/04/15
- [PATCH 03/10] Set lt_prog_compiler_static to -Bstatic on OS/2, KO Myung-Hun, 2011/04/15
- [PATCH 04/10] OS/2 uses other APIs to load a DLL than LoadLibrary() on Windows., KO Myung-Hun, 2011/04/15
- [PATCH 05/10] OS/2 uses ld inherited from GNU ld, KO Myung-Hun, 2011/04/15
- [PATCH 07/10] Set lt_cv_deplibs_check_method to pass_all on OS/2, KO Myung-Hun, 2011/04/15
- [PATCH 06/10] There is no need to relink DLLs on OS/2, KO Myung-Hun, 2011/04/15
- [PATCH 08/10] Support -Zxxx options used on OS/2, KO Myung-Hun, 2011/04/15
- [PATCH 09/10] Create import libraries instead of links to the real library on OS/2, KO Myung-Hun, 2011/04/15
- [PATCH 10/10] Fix a problem that it fails to find proper libraries if .la is a dependency on OS/2,
KO Myung-Hun <=
- [PATCH 00/10] Enhanced OS/2 ports, KO Myung-Hun, 2011/04/15
- [PATCH 02/10] Don't eliminate duplications in $postdeps and $predeps on OS/2, KO Myung-Hun, 2011/04/15
- [PATCH 04/10] OS/2 uses other APIs to load a DLL than LoadLibrary() on Windows., KO Myung-Hun, 2011/04/15
- [PATCH 03/10] Set lt_prog_compiler_static to -Bstatic on OS/2, KO Myung-Hun, 2011/04/15
- [PATCH 06/10] There is no need to relink DLLs on OS/2, KO Myung-Hun, 2011/04/15
- [PATCH 07/10] Set lt_cv_deplibs_check_method to pass_all on OS/2, KO Myung-Hun, 2011/04/15
- [PATCH 05/10] OS/2 uses ld inherited from GNU ld, KO Myung-Hun, 2011/04/15