]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix broken DESTDIR support.
authorBruno Haible <bruno@clisp.org>
Mon, 4 Feb 2002 13:35:31 +0000 (13:35 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 23:14:35 +0000 (01:14 +0200)
ChangeLog
ltmain.sh

index 8d3d1ab645db544ddf865526b813bf8e5aa56422..53539e89b96165153324264466d0e10029c85a67 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2002-02-02  Bruno Haible  <bruno@clisp.org>
+
+       * ltmain.sh: Add DESTDIR support on ELF systems.
+
 2002-01-31  Bruno Haible  <bruno@clisp.org>
 
        * gettext-0.11 released.
index 516b88c4aae7524916b900359a9d903ae5ea924b..a4d7f947fc6e6feedcf9f9f376c88190cc568e59 100644 (file)
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -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