+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.
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
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 "*) ;;
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
continue
fi
fi
+ unset DESTDIR
# See the names of the shared library.
set dummy $library_names