1 diff -urN aspell-0.50.2.orig/ltmain.sh aspell-0.50.2/ltmain.sh
2 --- aspell-0.50.2.orig/ltmain.sh Sun Oct 6 15:12:12 2002
3 +++ aspell-0.50.2/ltmain.sh Sun Oct 6 15:32:35 2002
17 + inst_prefix_dir="$arg"
24 @@ -1146,6 +1152,10 @@
33 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
34 # 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 @@ -2256,11 +2267,24 @@
48 + if test -n "$inst_prefix_dir"; then
51 + add_prefix_dir="-L$inst_prefix_dir$libdir"
56 + # add_prefix_dir must be appended instead, otherwise it can
57 + # possibly be overrided by any hardcoded -L/... path in deplibs
59 if test "$linkmode" = prog; then
60 + test -n "$add_prefix_dir" && finalize_deplibs="$finalize_deplibs $add_prefix_dir"
61 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
62 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
64 + test -n "$add_prefix_dir" && deplibs="$deplibs $add_prefix_dir"
65 test -n "$add_dir" && deplibs="$add_dir $deplibs"
66 test -n "$add" && deplibs="$add $deplibs"
71 # Quote the link command for shipping.
72 - relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args)"
73 + relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)"
74 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
76 # Only create the output if not a dry run.
77 @@ -4721,6 +4745,24 @@
80 if test -n "$relink_command"; then
81 + # Determine the prefix the user has applied to our future dir.
82 + inst_prefix_dir=`$echo "$destdir" | sed "s%$libdir\$%%"`
84 + # Don't allow the user to place us outside of our expected
85 + # location b/c this prevents finding dependent libraries that
86 + # are installed to the same prefix.
87 + if test "$inst_prefix_dir" = "$destdir"; then
88 + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
92 + if test -n "$inst_prefix_dir"; then
93 + # Stick the inst_prefix_dir data into the link command.
94 + relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
96 + relink_command=`$echo "$relink_command" | sed "s%@inst_prefix_dir@%%"`
99 $echo "$modename: warning: relinking \`$file'" 1>&2
100 $show "$relink_command"
101 if $run eval "$relink_command"; then :