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