1 --- libtool-1.4.3/ltmain.sh.wiget Thu Oct 24 16:57:17 2002
2 +++ libtool-1.4.3/ltmain.sh Thu Oct 24 16:57:17 2002
7 + inst_prefix_dir="$DESTDIR"
16 + inst_prefix_dir="$arg"
32 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
33 # so, if we see these flags be careful not to treat them like -L
37 if test "$linkmode" = prog || test "$mode" = relink; then
42 # Finalize command for both is simple: just hardcode it.
43 @@ -1907,10 +1919,22 @@
47 + if test -n "$inst_prefix_dir"; then
50 + add_prefix_dir="-L$inst_prefix_dir$libdir"
55 + # add_prefix_dir must be appended instead, otherwise it can
56 + # possibly be overrided by any hardcoded -L/... path in deplibs
57 if test "$linkmode" = prog; then
58 + test -n "$add_prefix_dir" && finalize_deplibs="$finalize_deplibs $add_prefix_dir"
59 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
60 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
62 + test -n "$add_prefix_dir" && deplibs="$deplibs $add_prefix_dir"
63 test -n "$add_dir" && deplibs="$add_dir $deplibs"
64 test -n "$add" && deplibs="$add $deplibs"
66 @@ -4229,6 +4253,24 @@
69 if test -n "$relink_command"; then
70 + # Determine the prefix the user has applied to our future dir.
71 + inst_prefix_dir=`$echo "$destdir" | sed "s%$libdir\$%%"`
73 + # Don't allow the user to place us outside of our expected
74 + # location b/c this prevents finding dependent libraries that
75 + # are installed to the same prefix.
76 + if test "$inst_prefix_dir" = "$destdir"; then
77 + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
81 + if test -n "$inst_prefix_dir"; then
82 + # Stick the inst_prefix_dir data into the link command.
83 + relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
85 + relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%%"`
88 $echo "$modename: warning: relinking \`$file'" 1>&2
89 $show "$relink_command"
90 if $run eval "$relink_command"; then :