export_symbols=
generated=
hardcode_libdirs=
+ finalize_hardcode_libdirs=
libobjs=
link_against_libtool_libs=
ltlibs=
xrpath=
perm_rpath=
temp_rpath=
+ finalize_rpath=
vinfo=
# We need to know -static, to get the right output filenames.
# This is the magic to use -rpath.
if test -n "$hardcode_libdir_flag_spec"; then
+ saved_libdir="$libdir"
+ libdir="$dir"
+
+ # We need an absolute path.
+ case "$libdir" in
+ /* | [A-Za-z]:[/\\]*) ;;
+ *)
+ absdir=`cd "$libdir" && pwd`
+ if test -z "$absdir"; then
+ $echo "$modename: cannot determine absolute directory name of \`$libdir'" 1>&2
+ else
+ libdir="$absdir"
+ fi
+ ;;
+ esac
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
# Put the magic libdir with the hardcode flag.
eval flag=\"$hardcode_libdir_flag_spec\"
compile_command="$compile_command $flag"
+ fi
+
+ libdir="$saved_libdir"
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$finalize_hardcode_libdirs"; then
+ # Put the magic libdir with the hardcode flag.
+ finalize_hardcode_libdirs="$libdir"
+ libdir="@HARDCODE_LIBDIRS@"
+ else
+ # Just accumulate the unique libdirs.
+ case "$hardcode_libdir_separator$finalize_hardcode_libdirs$hardcode_libdir_separator" in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ finalize_hardcode_libdirs="$finalize_hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ libdir=
+ fi
+ fi
+
+ if test -n "$libdir"; then
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
finalize_command="$finalize_command $flag"
fi
+ # libdir is also use after "$hardcode_action" case
+ libdir="$saved_libdir"
elif test -n "$runpath_var"; then
# Do the same for the permanent run path.
+ 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
+ absdir="$dir"
+ fi
+ ;;
+ esac
case "$perm_rpath " in
+ *" $absdir "*) ;;
+ *) perm_rpath="$perm_rpath $absdir" ;;
+ esac
+ case "$finalize_perm_rpath " in
*" $libdir "*) ;;
- *) perm_rpath="$perm_rpath $libdir" ;;
+ *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
esac
fi
# If the user specified any rpath flags, then add them.
for libdir in $rpath $xrpath; do
if test -n "$hardcode_libdir_flag_spec"; then
+ saved_libdir="$libdir"
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
# Put the magic libdir with the hardcode flag.
eval flag=\"$hardcode_libdir_flag_spec\"
compile_command="$compile_command $flag"
+ fi
+
+ libdir="$saved_libdir"
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$finalize_hardcode_libdirs"; then
+ # Put the magic libdir with the hardcode flag.
+ finalize_hardcode_libdirs="$libdir"
+ libdir="@HARDCODE_LIBDIRS@"
+ else
+ # Just accumulate the unique libdirs.
+ case "$hardcode_libdir_separator$finalize_hardcode_libdirs$hardcode_libdir_separator" in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ finalize_hardcode_libdirs="$finalize_hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ libdir=
+ fi
+ fi
+
+ if test -n "$libdir"; then
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
finalize_command="$finalize_command $flag"
fi
elif test -n "$runpath_var"; then
*" $libdir "*) ;;
*) perm_rpath="$perm_rpath $libdir" ;;
esac
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+ esac
fi
done
fi
# Substitute the hardcoded libdirs into the compile commands.
if test -n "$hardcode_libdir_separator"; then
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@HARDCODE_LIBDIRS@%$finalize_hardcode_libdirs%g"`
fi
output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
fi
- if test -n "$runpath_var" && test -n "$perm_rpath"; then
- # We should set the runpath_var.
- rpath=
- for dir in $perm_rpath; do
- rpath="$rpath$dir:"
- done
- compile_command="$runpath_var=\"$rpath\$$runpath_var\" $compile_command"
- finalize_command="$runpath_var=\"$rpath\$$runpath_var\" $finalize_command"
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ compile_command="$runpath_var=\"$rpath\$$runpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ finalize_command="$runpath_var=\"$rpath\$$runpath_var\" $finalize_command"
+ fi
fi
if test "$hardcode_action" = relink; then