irix5* | irix6*)
if test "$with_gcc" = yes; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
else
- archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
fi
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
osf3*)
if test "$with_gcc" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
else
allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
fi
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$with_gcc" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
else
allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
fi
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
continue
fi
;;
+ *.la) lib="$deplib" ;;
*.a | *.lib)
- if test $linkmode = prog; then
- if test $pass = scan; then
- deplibs="$deplibs $deplib"
- else
- compile_command="$compile_command $deplib"
- finalize_command="$finalize_command $deplib"
- fi
- continue
- elif test $linkmode = lib; then
+ case $linkmode in
+ lib)
if test "$deplibs_check_method" != pass_all; then
echo
echo "*** Warning: This library needs some functionality provided by $deplib."
deplibs="$deplibs $deplib"
fi
continue
- fi
+ ;;
+ prog)
+ if test $pass = scan; then
+ deplibs="$deplibs $deplib"
+ else
+ compile_command="$compile_command $deplib"
+ finalize_command="$finalize_command $deplib"
+ fi
+ continue
+ ;;
+ esac
;;
%DEPLIBS%)
alldeplibs=yes
continue
;;
- *)
- lib="$deplib"
- ;;
esac
if test $found = yes || test -f "$lib"; then :
else
new_lib_search_path="$new_lib_search_path $ladir"
deplibs="$deplibs $lib"
+ linkalldeplibs=no
+ if test "$link_all_deplibs" != no || test "$fast_install" != no || \
+ test "$build_libtool_libs" = no || test -z "$library_names"; then
+ linkalldeplibs=yes
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$newdependency_libs $dependeny_libs"
+ fi
+
for deplib in $dependency_libs; do
case "$deplib" in
-L*) new_lib_search_path="$new_lib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
esac
-
- if test "$link_all_deplibs" != no || \
- test "$fast_install" != no || \
- test "$build_libtool_libs" = no || \
- test -z "$library_names"; then
- # Need to link against all dependency_libs
- deplibs="$deplibs $deplib"
- else
- # Need to hardcode shared library paths
- # or/and link against static libraries
- newdependency_libs="$newdependency_libs $deplib"
- fi
+ # Need to link against all dependency_libs?
+ test $linkalldeplibs = yes && deplibs="$deplibs $deplib"
done
continue
fi
if test -z "$libdir"; then
# It is a libtool convenience library, so add in its objects.
- convenience="$convenience $ladir/$objdir/$old_library"
- old_convenience="$old_convenience $ladir/$objdir/$old_library"
+ convenience="$convenience $dir/$old_library"
+ old_convenience="$old_convenience $dir/$old_library"
if test $linkmode = lib; then
- deplibs="$deplibs $ladir/$objdir/$old_library"
+ deplibs="$deplibs $dir/$old_library"
newdependency_libs="$newdependency_libs $dependency_libs"
elif test "$linkmode,$pass" = "prog,link"; then
compile_command="$compile_command $dir/$old_library"
fi
if test "$linkmode,$pass" = "prog,link"; then
- hardcode=yes
- test "$hardcode_into_libs" = all && test "$alldeplibs" = yes && hardcode=no
- if test "$hardcode" = yes && test -n "$library_names" &&
+ if test -n "$library_names" &&
+ { test "$hardcode_into_libs" != all || test "$alldeplibs" != yes; } &&
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
# We need to hardcode the library path
if test -n "$shlibpath_var"; then
linklib=$newlib
fi
- if test $linkmode = lib; then
-
- add_dir=
- add_shlibpath=
- add_name=no
- if test "$mode" != relink; then
+ if test $linkmode = prog || test "$mode" != relink; then
+ add_shlibpath=
+ add_dir=
+ add=
lib_linked=yes
case "$hardcode_action" in
immediate | unsupported)
if test "$hardcode_direct" = no; then
- deplibs="$deplibs $dir/$linklib"
+ add="$dir/$linklib"
elif test "$hardcode_minus_L" = no; then
case "$host" in
*-*-sunos*) add_shlibpath="$dir" ;;
esac
add_dir="-L$dir"
- add_name=yes
+ add="-l$name"
elif test "$hardcode_shlibpath_var" = no; then
add_shlibpath="$dir"
- add_name=yes
+ add="-l$name"
else
lib_linked=no
fi
;;
relink)
if test "$hardcode_direct" = yes; then
- deplibs="$deplibs $dir/$linklib"
+ add="$dir/$linklib"
elif test "$hardcode_minus_L" = yes; then
add_dir="-L$dir"
- add_name=yes
+ add="-l$name"
elif test "$hardcode_shlibpath_var" = yes; then
add_shlibpath="$dir"
- add_name=yes
+ add="-l$name"
else
lib_linked=no
fi
*) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
esac
fi
- else
- # Install command for both is simple: just hardcode it.
+ if test $linkmode = prog; then
+ if test -n "$add_dir"; then
+ case "$compile_command " in
+ *" $add_dir "*) ;;
+ *) compile_command="$compile_command $add_dir" ;;
+ esac
+ fi
+ test -n "$add" && compile_command="$compile_command $add"
+ else
+ if test -n "$add_dir"; then
+ case "$deplibs " in
+ *" $add_dir "*) ;;
+ *) deplibs="$deplibs $add_dir" ;;
+ esac
+ fi
+ test -n "$add" && deplibs="$deplibs $add"
+ if test "$hardcode_direct" != yes && \
+ test "$hardcode_minus_L" != yes && \
+ test "$hardcode_shlibpath_var" = yes; then
+ case ":$finalize_shlibpath:" in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test $linkmode = prog || test "$mode" = relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
if test "$hardcode_direct" = yes; then
- deplibs="$deplibs $libdir/$linklib"
+ add="$libdir/$linklib"
elif test "$hardcode_minus_L" = yes; then
add_dir="-L$libdir"
- add_name=yes
+ add="-l$name"
elif test "$hardcode_shlibpath_var" = yes; then
- add_name=yes
- else
- # We cannot seem to hardcode it, guess we'll fake it.
- add_dir="-L$libdir"
- add_name=yes
- fi
- fi
- if test "$hardcode_direct" != yes && \
- test "$hardcode_minus_L" != yes && \
- test "$hardcode_shlibpath_var" = yes; then
case ":$finalize_shlibpath:" in
*":$libdir:"*) ;;
*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
esac
- fi
- if test -n "$add_dir"; then
- case "$deplibs " in
- *" $add_dir "*) ;;
- *) deplibs="$deplibs $add_dir" ;;
- esac
- fi
- test "$add_name" = yes && deplibs="$deplibs -l$name"
-
- else
-
- lib_linked=yes
- add_dir=
- add_shlibpath=
- add_name=no
- case "$hardcode_action" in
- immediate | unsupported)
- if test "$hardcode_direct" = no; then
- compile_command="$compile_command $dir/$linklib"
- elif test "$hardcode_minus_L" = no; then
- case "$host" in
- *-*-sunos*) add_shlibpath="$dir" ;;
- esac
- add_dir="-L$dir"
- add_name=yes
- elif test "$hardcode_shlibpath_var" = no; then
- add_shlibpath="$dir"
- add_name=yes
+ add="-l$name"
else
- lib_linked=no
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir="-L$libdir"
+ add="-l$name"
fi
- ;;
- relink)
- if test "$hardcode_direct" = yes; then
- compile_command="$compile_command $absdir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$absdir"
- add_name=yes
- elif test "$hardcode_shlibpath_var" = yes; then
- add_shlibpath="$absdir"
- add_name=yes
+ if test $linkmode = prog; then
+ if test -n "$add_dir"; then
+ case "$finalize_command " in
+ *" $add_dir "*) ;;
+ *) finalize_command="$finalize_command $add_dir" ;;
+ esac
+ fi
+ test -n "$add" && finalize_command="$finalize_command $add"
else
- lib_linked=no
+ if test -n "$add_dir"; then
+ case "$deplibs " in
+ *" $add_dir "*) ;;
+ *) deplibs="$deplibs $add_dir" ;;
+ esac
+ fi
+ test -n "$add" && deplibs="$deplibs $add"
fi
- ;;
-
- *) lib_linked=no ;;
- esac
-
- if test "$lib_linked" != yes; then
- $echo "$modename: configuration error: unsupported hardcode properties"
- exit 1
- fi
- if test -n "$add_dir"; then
- case "$compile_command " in
- *" $add_dir "*) ;;
- *) compile_command="$compile_command $add_dir" ;;
- esac
- fi
- if test -n "$add_shlibpath"; then
- case ":$compile_shlibpath:" in
- *":$add_shlibpath:"*) ;;
- *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
- esac
- fi
- test "$add_name" = yes && compile_command="$compile_command -l$name"
-
- add_dir=
- add_name=no
- # Finalize command for both is simple: just hardcode it.
- if test "$hardcode_direct" = yes; then
- finalize_command="$finalize_command $libdir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$libdir"
- add_name=yes
- elif test "$hardcode_shlibpath_var" = yes; then
- case ":$finalize_shlibpath:" in
- *":$libdir:"*) ;;
- *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
- esac
- add_name=yes
- else
- # We cannot seem to hardcode it, guess we'll fake it.
- add_dir="-L$libdir"
- add_name=yes
- fi
- if test -n "$add_dir"; then
- case "$finalize_command " in
- *" $add_dir "*) ;;
- *) finalize_command="$finalize_command $add_dir" ;;
- esac
- fi
- test "$add_name" = yes && finalize_command="$finalize_command -l$name"
-
fi
elif test $linkmode = prog; then
# Here we assume that one of hardcode_direct or hardcode_minus_L
fi
fi
- if test "$linkmode" = "lib"; then
+ if test $linkmode = lib; then
if test -n "$dependency_libs" &&
{ test "$hardcode_into_libs" = no || test $build_old_libs = yes ||
test $link_static = yes; }; then
lib_search_path="$lib_search_path $sys_lib_search_path"
done
- case "$linkmode" in
+ case $linkmode in
oldlib)
if test -n "$deplibs"; then
$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2