mirror of
https://https.git.savannah.gnu.org/git/libtool.git
synced 2026-01-27 01:44:28 +00:00
* ltmain.in (finalize_hardcode_libdirs, finalize_rpath): in
platforms that use -rpath, programs must be finalized at installation time, otherwise build-tree programs will prefer installed libraries over build-tree ones
This commit is contained in:
parent
275e35f2f0
commit
bcdffabfe9
@ -1,3 +1,10 @@
|
||||
1999-01-22 Edouard G. Parmelan <Edouard.Parmelan@France.NCR.COM>
|
||||
|
||||
* ltmain.in (finalize_hardcode_libdirs, finalize_rpath): in
|
||||
platforms that use -rpath, programs must be finalized at
|
||||
installation time, otherwise build-tree programs will
|
||||
prefer installed libraries over build-tree ones
|
||||
|
||||
1999-01-22 Alexandre Oliva <oliva@dcc.unicamp.br>
|
||||
|
||||
* mdemo/Makefile.am (../libltdl/libtool): if it does not exist,
|
||||
|
||||
115
ltmain.in
115
ltmain.in
@ -672,6 +672,7 @@ compiler."
|
||||
export_symbols=
|
||||
generated=
|
||||
hardcode_libdirs=
|
||||
finalize_hardcode_libdirs=
|
||||
libobjs=
|
||||
link_against_libtool_libs=
|
||||
ltlibs=
|
||||
@ -685,6 +686,7 @@ compiler."
|
||||
xrpath=
|
||||
perm_rpath=
|
||||
temp_rpath=
|
||||
finalize_rpath=
|
||||
vinfo=
|
||||
|
||||
# We need to know -static, to get the right output filenames.
|
||||
@ -1058,6 +1060,21 @@ compiler."
|
||||
|
||||
# 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.
|
||||
@ -1080,13 +1097,53 @@ compiler."
|
||||
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
|
||||
|
||||
@ -1942,6 +1999,7 @@ EOF
|
||||
# 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.
|
||||
@ -1964,6 +2022,30 @@ EOF
|
||||
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
|
||||
@ -1971,6 +2053,10 @@ EOF
|
||||
*" $libdir "*) ;;
|
||||
*) perm_rpath="$perm_rpath $libdir" ;;
|
||||
esac
|
||||
case "$finalize_perm_rpath " in
|
||||
*" $libdir "*) ;;
|
||||
*) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
fi
|
||||
@ -1978,7 +2064,7 @@ EOF
|
||||
# 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%/[^/]*$%%'`
|
||||
@ -2201,14 +2287,23 @@ static const void *lt_preloaded_setup() {
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user