diff options
author | Bruno Haible <bruno@clisp.org> | 2002-02-04 13:35:31 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-22 01:14:35 +0200 |
commit | 2d3618850363388d2a006afddfa2b44f4421032b (patch) | |
tree | 5a9f77107e031b477af25d68c7408cfc4544884a /ltmain.sh | |
parent | 78843497b95bae9ea82fad8447e561855926b225 (diff) | |
download | external_gettext-2d3618850363388d2a006afddfa2b44f4421032b.zip external_gettext-2d3618850363388d2a006afddfa2b44f4421032b.tar.gz external_gettext-2d3618850363388d2a006afddfa2b44f4421032b.tar.bz2 |
Fix broken DESTDIR support.
Diffstat (limited to 'ltmain.sh')
-rw-r--r-- | ltmain.sh | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -1865,7 +1865,11 @@ compiler." add="-l$name" else # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" + if test "X$installed" = Xyes; then + add_dir="-L$libdir" + else + add_dir="-L$DESTDIR$libdir" + fi add="-l$name" fi @@ -4110,12 +4114,21 @@ relink_command=\"$relink_command\"" esac # Add the libdir to current_libdirs if it is the destination. + DESTDIR= if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else + case "$destdir" in + *"$libdir") + DESTDIR=`$echo "$destdir" | sed -e 's!'"$libdir"'$!!'` + if test "X$destdir" != "X$DESTDIR$libdir"; then + DESTDIR= + fi + ;; + esac # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; @@ -4129,6 +4142,7 @@ relink_command=\"$relink_command\"" if test -n "$relink_command"; then $echo "$modename: warning: relinking \`$file'" 1>&2 + export DESTDIR $show "$relink_command" if $run eval "$relink_command"; then : else @@ -4136,6 +4150,7 @@ relink_command=\"$relink_command\"" continue fi fi + unset DESTDIR # See the names of the shared library. set dummy $library_names |