summaryrefslogtreecommitdiff
path: root/ltmain.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ltmain.sh')
-rw-r--r--ltmain.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/ltmain.sh b/ltmain.sh
index f53abfd..fcc4d74 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -6900,7 +6900,11 @@ func_mode_link ()
# Finalize command for both is simple: just hardcode it.
if test "$hardcode_direct" = yes &&
test "$hardcode_direct_absolute" = no; then
- add="$libdir/$linklib"
+ if test -f "$inst_prefix_dir$libdir/$linklib"; then
+ add="$inst_prefix_dir$libdir/$linklib"
+ else
+ add="$libdir/$linklib"
+ fi
elif test "$hardcode_minus_L" = yes; then
add_dir="-L$libdir"
add="-l$name"
@@ -9428,7 +9432,8 @@ dlpreopen='$dlprefiles'
# Directory that this library needs to be installed in:
libdir='$install_libdir'"
- if test "$installed" = no && test "$need_relink" = yes; then
+ if test "$installed" = no && test "$need_relink" = yes && \
+ test -n "$relink_command"; then
$ECHO >> $output "\
relink_command=\"$relink_command\""
fi