;;
# libtool link mode
- link | link-install)
+ link | relink)
modename="$modename: link"
- link_install=no
- test "$mode" = "link-install" && link_install=yes
- link_command="$nonopt"
+ relink=no
+ test "$mode" = "relink" && relink=yes
+ link_command_save="$nonopt"
C_compiler="$CC" # save it, to compile generated C sources
CC="$nonopt"
case "$host" in
while test $# -gt 0; do
arg="$1"
shift
- link_command="$link_command $arg"
+ link_command_save="$link_command_save $arg"
# If the previous option needs an argument, assign it.
if test -n "$prev"; then
;;
-l*)
+ case "$host" in
+ *-*-cygwin*)
+ # The cygwin environment doesn't actually have -lm, and
+ # although the linker fakes having one, specifiying it to
+ # libtool will break ILD!
+ if test "$arg" = "-lm"; then
+ continue
+ fi
+ ;;
+ esac
deplibs="$deplibs $arg"
continue
;;
lib_search_path="$lib_search_path $sys_lib_search_path $shlib_search_path"
# Quote the link command for shipping.
- link_command=`$echo "X$link_command" | $Xsed -e "$sed_quote_subst"`
- link_dir=`pwd | sed -e $sed_quote_subst`
+ link_command_save=`$echo "X$link_command_save" | $Xsed -e "$sed_quote_subst"`
+ link_dir_save=`pwd | sed -e $sed_quote_subst`
case "$output" in
"")
esac
fi
- # Create the output directory, or remove our outputs if we need to.
- if test -d $output_objdir; then
- $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
- $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
- else
- $show "$mkdir $output_objdir"
- $run $mkdir $output_objdir
- status=$?
- if test $status -ne 0 && test ! -d $output_objdir; then
- exit $status
- fi
+ if test "$relink" = no; then
+ # Create the output directory, or remove our outputs if we need to.
+ if test -d $output_objdir; then
+ $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
+ $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
+ else
+ $show "$mkdir $output_objdir"
+ $run $mkdir $output_objdir
+ status=$?
+ if test $status -ne 0 && test ! -d $output_objdir; then
+ exit $status
+ fi
+ fi
fi
# Now set the variables for building old libraries.
release_save=$release
versuffix_save=$versuffix
major_save=$major
- link_command_save=$link_command
- link_dir_save=$link_dir
# Find libtool libraries and add their dependencies and directories
newdeplibs= # libraries to link (used in archive_cmds)
newdependency_libs= # all dependency libraries
uninst_path= # paths that contain uninstalled libtool libraries
+ rpath=
new_lib_search_path=
for deplib in $deplibs; do
lib=
continue
;;
-l*)
- case "$host" in
- *-*-cygwin*)
- # The cygwin environment doesn't actually have -lm, and
- # although the linker fakes having one, specifiying it to
- # libtool will break ILD!
- case "$deplib" in
- -lm) continue ;;
- esac
- esac
name="`expr $deplib : '-l\(.*\)'`"
libname=`eval \\$echo \"$libname_spec\"`
found=no
test "X$ladir" = "X$lib" && ladir="."
# We need an absolute path.
case "$ladir" in
- /* | [A-Za-z]:[/\\]*) ;;
+ /* | [A-Za-z]:[/\\]*) abs_ladir="$ladir" ;;
*)
- absdir=`cd "$ladir" && pwd`
- if test -z "$absdir"; then
- $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ $echo "$modename: cannot determine absolute directory name of \`$ladir'" 1>&2
exit 1
fi
- ladir="$absdir"
;;
esac
laname=`echo "X$lib" | $Xsed -e 's%^.*/%%'`
- lib="$ladir/$laname"
# Check to see that this really is a libtool archive.
if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
# Find the relevant object directory and library name.
if test "X$installed" = Xyes; then
dir="$libdir"
+ absdir="$libdir"
+ else
+ dir="$ladir/$objdir"
case "$dir" in
- /* | [A-Za-z]:[/\\]*) ;;
+ /* | [A-Za-z]:[/\\]*) absdir="$dir" ;;
*)
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
$echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
exit 1
fi
- dir="$absdir"
;;
esac
- else
- dir="$ladir/$objdir"
# Remove this search path later
- uninst_path="$uninst_path $ladir"
+ uninst_path="$uninst_path $abs_ladir"
fi
-
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
- if test -z "$libdir"; then
- # It is a libtool convenience library.
- $echo "$modename: cannot link libtool libraries against convenience libraries" 1>&2
- exit 1
- fi
-
if test "$build_libtool_libs" = yes && test -n "$library_names"; then
- # This is the magic to use -rpath.
- if test -n "$hardcode_libdir_flag_spec"; then
- saved_libdir="$libdir"
- test $link_install = no && libdir="$dir"
-
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- # Put the magic libdir with the hardcode flag.
- hardcode_libdirs="$libdir"
- libdir="@HARDCODE_LIBDIRS@"
- else
- # Just accumulate the unique libdirs.
- case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- libdir=
- fi
- fi
- if test -n "$libdir"; then
- eval flag=\"$hardcode_libdir_flag_spec\"
-
- newdeplibs="$newdeplibs $flag"
- fi
- # libdir is also use after "$hardcode_action" case
- libdir="$saved_libdir"
- fi
+ # Hardcode the library path.
+ tmpdir="$libdir"
+ test "$must_relink" = yes && test "$relink" = no && tmpdir="$absdir"
+ # Make sure the rpath contains only unique directories.
+ case "$rpath " in
+ *" $tmpdir "*) ;;
+ *) rpath="$rpath $tmpdir" ;;
+ esac
- if test $link_install = no; then
+ if test "$relink" = no; then
lib_linked=yes
case "$hardcode_action" in
immediate | unsupported)
newdeplibs="$newdeplibs $dir/$old_library"
fi
- new_lib_search_path="$new_lib_search_path $dir"
+ new_lib_search_path="$new_lib_search_path $absdir"
# Link against this library
- newdependency_libs="$newdependency_libs $dependency_libs $lib"
+ newdependency_libs="$newdependency_libs $dependency_libs $abs_ladir/$laname"
done
# Make sure lib_search_path contains only unique directories.
# If the user specified any rpath flags, then add them.
temp_xrpath=
for dir in $xrpath; do
+ temp_xrpath="$temp_xrpath -R$dir"
+ done
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+
+ dep_rpath=
+ if test -n "$rpath$xrpath" && test "$hardcode_into_libs" = yes && test -n "$hardcode_libdir_flag_spec"; then
+ for dir in $rpath $xrpath; do
libdir="$dir"
- temp_xrpath="$temp_xrpath -R$libdir"
- if test -n "$hardcode_libdir_flag_spec"; then
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- # Put the magic libdir with the hardcode flag.
- hardcode_libdirs="$dir"
- libdir="@HARDCODE_LIBDIRS@"
- else
- # Just accumulate the unique libdirs.
- case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
- *"$hardcode_libdir_separator$dir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$dir"
- ;;
- esac
- libdir=
- fi
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ # Put the magic libdir with the hardcode flag.
+ hardcode_libdirs="$dir"
+ libdir="@HARDCODE_LIBDIRS@"
+ else
+ # Just accumulate the unique libdirs.
+ case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
+ *"$hardcode_libdir_separator$dir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$dir"
+ ;;
+ esac
+ libdir=
fi
+ fi
- if test -n "$libdir"; then
- eval flag=\"$hardcode_libdir_flag_spec\"
+ if test -n "$libdir"; then
+ eval flag=\"$hardcode_libdir_flag_spec\"
- deplibs="$deplibs $flag"
- fi
+ dep_rpath="$dep_rpath $flag"
fi
done
- dependency_libs="$temp_xrpath $dependency_libs"
fi
- # Substitute the hardcoded libdirs into the compile commands.
+ # Substitute the hardcoded libdirs into the dep_rpath.
if test -n "$hardcode_libdir_separator"; then
- deplibs=`$echo "X$deplibs" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
+ dep_rpath=`$echo "X$dep_rpath" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
# Restore the variables
- link_dir=$link_dir_save
- link_command=$link_command_save
versuffix=$versuffix_save
major=$major_save
release=$release_save
# Did it work?
if test $? -eq 0 ; then
ldd_output=`ldd conftest`
- libname=`eval \\$echo \"$libname_spec\"`
- deplib_matches=`eval \\$echo \"$library_names_spec\"`
- set dummy $deplib_matches
- deplib_match=$2
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- echo
- echo "*** Warning: This library needs some functionality provided by $i."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have."
- fi
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
else
droppeddeps=yes
echo
done
fi
+ # Make a backup of the uninstalled library when relinking
+ if test "$relink" = yes && test "$hardcode_into_libs" = yes ; then
+ $run eval '(cd $output_objdir && $rm "$realname"U && $mv $realname "$realname"U)' || exit $?
+ fi
+
# Do each of the archive commands.
if test -n "$export_symbols" && test -n "$archive_sym_cmds"; then
eval cmds=\"$archive_sym_cmds\"
fi
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
if test -n "$shlibpath"; then
- eval "export $shlibpath_var='$shlibpath\$$shlibpath_var'"
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
fi
for cmd in $cmds; do
IFS="$save_ifs"
done
IFS="$save_ifs"
+ # Restore the uninstalled library and exit
+ if test "$relink" = yes && test "$hardcode_into_libs" = yes; then
+ $run eval '(cd $output_objdir && $rm "$realname"T && $mv $realname "$realname"T && $mv "$realname"U $realname)' || exit $?
+ exit 0
+ fi
+
# Create links to the real library.
for linkname in $linknames; do
if test "$realname" != "$linkname"; then
# Find libtool libraries and add their dependencies/rpaths
newdeplibs=
+ newdependency_libs=
new_lib_search_path=
for deplib in $deplibs; do
lib=
new_lib_search_path="$new_lib_search_path `$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`"
newdeplibs="$newdeplibs $lib"
-
- if test -z "$libdir" || test "$build_libtool_libs" = no || test "$deplibs_check_method" = none; then
- # Add in any libraries that this one depends upon.
- newdeplibs="$newdeplibs $dependency_libs"
- fi
+ newdependency_libs="$newdependency_libs $dependency_libs"
for deplib in $dependency_libs; do
case "$deplib" in
esac
done
+ # Make sure dependency_libs contains only unique libraries and directories.
+ dependency_libs=
+ for deplib in $newdependency_libs; do
+ case "$dependency_libs " in
+ *" $deplib "*) ;;
+ *) dependency_libs="$dependency_libs $deplib" ;;
+ esac
+ done
+
# Find libtool libraries and add their directories
newdeplibs=
+ alldeplibs=no
+ linkalldeplibs=no
+ if test "$build_libtool_libs" = no || test "$deplibs_check_method" = none; then
+ linkalldeplibs=yes
+ fi
link_against_libtool_libs=
- for deplib in $deplibs; do
+ for deplib in $deplibs @DEPLIBS@ $dependency_libs; do
lib=
case "$deplib" in
-L*)
*" $dir "*) ;;
*) xrpath="$xrpath $dir" ;;
esac
+ continue
+ ;;
+ @DEPLIBS@)
+ if test "$hardcode_into_libs" = yes; then
+ break
+ fi
+ alldeplibs=yes
+ continue
;;
-l*)
name="`expr $deplib : '-l\(.*\)'`"
# Find the relevant object directory and library name.
if test "X$installed" = Xyes; then
dir="$libdir"
+ absdir="$libdir"
else
- dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
- test "$dir" = "$deplib" && dir=.
- dir="$dir/$objdir"
+ dir="`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`/"
+ test "$dir" = "$deplib/" && dir=
+ dir="$dir$objdir"
+ case "$dir" in
+ /* | [A-Za-z]:[/\\]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
+ exit 1
+ fi
+ ;;
+ esac
fi
+
+ if test "$build_libtool_libs" = yes && test -n "$library_names"; then
+ if test -n "$shlibpath_var"; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath " in
+ *" $dir "*) ;;
+ *" $absdir "*) ;;
+ *) temp_rpath="$temp_rpath $dir" ;;
+ esac
+ fi
+ # This is the magic to use -rpath.
+ tmpdir="$libdir"
+ test "$must_relink" = yes && test "$relink" = no && tmpdir="$absdir"
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $tmpdir "*) ;;
+ *) xrpath="$xrpath $tmpdir" ;;
+ esac
+ fi
+
+ if test "$alldeplibs" = yes && test "$linkalldeplibs" = no; then
+ continue
+ fi
+
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
if test -z "$libdir"; then
if test "$build_libtool_libs" = yes && test -n "$library_names"; then
link_against_libtool_libs="$link_against_libtool_libs $lib"
- if test -n "$shlibpath_var"; then
- # Make sure the rpath contains only unique directories.
- case "$temp_rpath " in
- *" $dir "*) ;;
- *) temp_rpath="$temp_rpath $dir" ;;
- esac
- fi
-
- # This is the magic to use -rpath.
- if test -n "$hardcode_libdir_flag_spec"; then
- saved_libdir="$libdir"
- test $link_install = no && libdir="$dir"
- if test -n "$hardcode_libdir_separator"; then
- if test -z "$hardcode_libdirs"; then
- # Put the magic libdir with the hardcode flag.
- hardcode_libdirs="$libdir"
- libdir="@HARDCODE_LIBDIRS@"
- else
- # Just accumulate the unique libdirs.
- case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
- *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
- ;;
- *)
- hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
- ;;
- esac
- libdir=
- fi
- fi
-
- if test -n "$libdir"; then
- eval flag=\"$hardcode_libdir_flag_spec\"
- newdeplibs="$newdeplibs $flag"
- fi
- libdir="$saved_libdir"
- elif test -n "$runpath_var"; then
- # Do the same for the permanent run path.
- case "$perm_rpath " in
- *" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
- esac
- fi
-
- if test $link_install = no; then
+ if test $relink = no; then
lib_linked=yes
case "$hardcode_action" in
immediate | unsupported)
done
deplibs="$newdeplibs"
+ dep_rpath=
+ # Now hardcode the library paths
if test -n "$rpath$xrpath"; then
# If the user specified any rpath flags, then add them.
for libdir in $rpath $xrpath; do
if test -n "$libdir"; then
eval flag=\"$hardcode_libdir_flag_spec\"
- deplibs="$deplibs $flag"
+ dep_rpath="$dep_rpath $flag"
fi
elif test -n "$runpath_var"; then
case "$perm_rpath " in
done
fi
- # Substitute the hardcoded libdirs into the deplibs.
+ # Substitute the hardcoded libdirs into the dep_rpath.
if test -n "$hardcode_libdir_separator"; then
- deplibs=`$echo "X$deplibs" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
+ dep_rpath=`$echo "X$dep_rpath" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
# Add in the deplibs.
test -n "$deplibs" && compile_command="$compile_command $deplibs"
fi
# Replace the output file specification.
- if test $link_install = no; then
+ if test $relink = no; then
compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
else
- compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'_lt%g'`
+ compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'T%g'`
fi
# Create the binary in the object directory, then wrap it.
temp_rpath="$rpath"
fi
- # Delete the old output file.
- $run $rm $output
-
if test -n "$shlibpath"; then
- compile_command="$shlibpath_var=\"$shlibpath\$$shlibpath_var\" $compile_command"
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
fi
if test -n "$runpath_var"; then
for dir in $perm_rpath; do
rpath="$rpath$dir:"
done
- compile_command="$runpath_var=\"$rpath\$$runpath_var\" $compile_command"
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
fi
fi
- if test "$hardcode_action" = relink; then
+ if test "$must_relink" = yes && test "$relink" = no; then
# AGH! Flame the AIX and HP-UX people for me, will ya?
$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
$echo "$modename: \`$output' will be relinked during installation" 1>&2
$show "$compile_command"
$run eval "$compile_command" || exit $?
+ # Exit if relinking succeeded
+ test "$relink" = yes && exit 0
+
+ # Delete the old output file.
+ $run $rm $output
+
# Now create the wrapper script.
$show "creating $output"
if test \"\$libtool_install_magic\" = \"$magic\"; then
# install mode needs the following variables:
link_against_libtool_libs='$link_against_libtool_libs'
- link_command=\"$link_command\"
- link_dir=\"$link_dir\"
+ link_command=\"$link_command_save\"
+ link_dir=\"$link_dir_save\"
else
# When we are sourced in execute mode, \$file and \$echo are already set.
if test \"\$libtool_execute_magic\" != \"$magic\"; then
# Directory that this library needs to be installed in:
libdir='$install_libdir'
-link_command=\"$link_command\"
-link_dir=\"$link_dir\"\
+link_command=\"$link_command_save\"
+link_dir=\"$link_dir_save\"\
"
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case "$deplib" in
+ -L* | -R* | -l*)
+ newdependency_libs="$newdependency_libs $deplib"
+ ;;
+ *)
+ name=`echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+ eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ if test -z "$libdir"; then
+ $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+ newdependency_libs="$newdependency_libs $libdir/$name"
+ ;;
+ esac
+ done
+
$rm "$output_objdir/$outputname"i
sed -e 's/^installed=no$/installed=yes/' \
-e "s%^dependency_libs=\(.*\)%dependency_libs='$newdependency_libs'%" \
exit 1
fi
+ link_command=
+ link_dir=
+ dependency_libs=
+ # If there is no directory component, then add one.
+ case "$file" in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Check the variables that should have been set.
+ if test -z "$dependency_libs" || test -z "$link_command" || test -z "$link_dir"; then
+ $echo "$modename: invalid libtool pseudo library \`$file'" 1>&2
+ exit 1
+ fi
+
+ finalize=yes
+ for lib in $dependency_libs; do
+ case "$lib" in
+ *.la)
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ . $lib
+ fi
+ libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+ finalize=no
+ fi
+ ;;
+ esac
+ done
+
link_command=
link_dir=
library_names=
test "X$dir" = "X$file/" && dir=
dir="$dir$objdir"
- if test "$hardcode_action" = relink; then
+ if test "$must_relink" = yes && test "$hardcode_into_libs" = yes; then
if test "$finalize" = yes; then
$echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2
- finalize_command="cd $link_dir; $SHELL $0 -mode=link-install $link_command"
+ finalize_command="cd $link_dir; $SHELL $0 --mode=relink $link_command"
$show "$finalize_command"
if $run eval "$finalize_command"; then :
else
- echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+ $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
continue
fi
- file="$objdir/$file"T
else
- $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
+ $echo "$modename: error: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
+ continue
fi
- else
- # Install the binary that we compiled earlier.
- file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
fi
# See the names of the shared library.
shift
shift
+ srcname="$realname"
+ test "$must_relink" = yes && test "$hardcode_into_libs" = yes && srcname="$realname"T
+
# Install the shared library and build the symlinks.
- $show "$install_prog $dir/$realname $destdir/$realname"
- $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
+ $show "$install_prog $dir/$srcname $destdir/$realname"
+ $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
test "X$dlname" = "X$realname" && dlname=
if test $# -gt 0; then
IFS="$save_ifs"
fi
- # Replace all uninstalled libtool libraries with the installed ones
- newdependency_libs=
- for deplib in $dependency_libs; do
- case "$deplib" in
- -L* | -R* | -l*)
- newdependency_libs="$newdependency_libs $deplib"
- ;;
- *)
- name=`echo "X$deplib" | $Xsed -e 's%^.*/%%'`
- eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- if test -z "$libdir"; then
- $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
- exit 1
- fi
- newdependency_libs="$newdependency_libs $libdir/$name"
- ;;
- esac
- done
-
# Install the pseudo-library for information purposes.
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
instname="$dir/$name"i
# Do a test to see if this is really a libtool program.
if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- link_against_libtool_libs=
link_command=
link_dir=
+ link_against_libtool_libs=
# If there is no directory component, then add one.
case "$file" in
fi
done
- if test "$hardcode_action" = relink; then
+ link_command=
+ link_dir=
+ link_against_libtool_libs=
+
+ # If there is no directory component, then add one.
+ case "$file" in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ if test "$must_relink" = yes; then
if test "$finalize" = yes; then
$echo "$modename: warning: relinking \`$file' on behalf of your buggy system linker" 1>&2
- finalize_command="cd $link_dir; $SHELL $0 -mode=link-install $link_command"
+ finalize_command="cd $link_dir; $SHELL $0 --mode=relink $link_command"
$show "$finalize_command"
if $run eval "$finalize_command"; then :
else
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
continue
fi
- file="$objdir/$file"_lt
+ file="$objdir/$file"T
else
- $echo "$modename: warning: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
+ $echo "$modename: error: cannot relink \`$file' on behalf of your buggy system linker" 1>&2
+ continue
fi
else
# Install the binary that we compiled earlier.