--- libtool-2.2.6a.orig/debian/libtool-doc.docs
+++ libtool-2.2.6a/debian/libtool-doc.docs
@@ -0,0 +1,7 @@
+README
+AUTHORS
+THANKS
+NEWS
+TODO
+ChangeLog.*
+doc/libtool.html
--- libtool-2.2.6a.orig/debian/watch
+++ libtool-2.2.6a/debian/watch
@@ -0,0 +1,2 @@
+version=2
+ftp://ftp.gnu.org/gnu/libtool/libtool-(.*)\.tar\.gz debian uupdate
--- libtool-2.2.6a.orig/debian/compat
+++ libtool-2.2.6a/debian/compat
@@ -0,0 +1 @@
+4
--- libtool-2.2.6a.orig/debian/changelog
+++ libtool-2.2.6a/debian/changelog
@@ -0,0 +1,397 @@
+libtool (2.2.6a-4~bpo50+1) lenny-backports; urgency=low
+
+  * Rebuild for lenny.
+  * Add myself as an uploader.
+
+ -- Andres Salomon <dilinger@debian.org>  Fri, 09 Oct 2009 21:12:01 +0000
+
+libtool (2.2.6a-4) unstable; urgency=low
+
+  * link_all_deplibs was only set to no for the CXX tag.  Set it to no
+    again for all tags.  (Closes: #522663)
+  * Don't let a failed testsuite also fail to build for now.  The combination
+    of setting link_all_deplibs=no and the deplib_binary.patch make some test
+    fail, but those look like testsuite errors.
+
+ -- Kurt Roeckx <kurt@roeckx.be>  Tue, 07 Apr 2009 19:55:06 +0200
+
+libtool (2.2.6a-3) unstable; urgency=low
+
+  * Don't pull in depedency libs when linking a binary.  (Closes: #522663)
+  * DEB_BUILD_OPTIONS nocheck worked inverted.
+
+ -- Kurt Roeckx <kurt@roeckx.be>  Mon, 06 Apr 2009 22:43:44 +0200
+
+libtool (2.2.6a-2) unstable; urgency=low
+
+  * Rename libltdl7-dev to libltdl-dev, and make it provide libltdl3-dev
+    and libltdl7-dev.
+  * We don't have an arm arch anymore, so remove from build depedency
+    exception.  Instead add hppa since that doesn't have gcj.
+  * Add all info pages (Closes: #495411, #512013)
+  * Force /bin/bash as shell of /usr/bin/libtool instead of /bin/sh.  The
+    generate scripts excepts to have them same shell when it's run.
+    (Closes: #512013, #518905)
+  * Do not add bogus directory arguments to link command lines.
+    Patch from upstream. (Closes: #517501)
+  * Fix bogus error on successful loading of library with lt_dlopenext.
+    Patch already applied upstream. (Closes: #517501)
+  * Add support for the DEB_BUILD_OPTIONS nocheck option
+  * Update to Standards-Version 3.8.1
+
+ -- Kurt Roeckx <kurt@roeckx.be>  Mon, 30 Mar 2009 22:40:04 +0200
+
+libtool (2.2.6a-1) experimental; urgency=low
+
+  * New upstream release (Closes: #501783)
+  * libtool.info-1 anddoc/libtool.info-2 are change during build,
+    remove during clean.
+
+ -- Kurt Roeckx <kurt@roeckx.be>  Tue, 18 Nov 2008 20:41:42 +0100
+
+libtool (2.2.2-1) experimental; urgency=low
+
+  * New upstream release (Closes: #470057)
+  * Remove fortran 77 build dependencies (Closes: #463744)
+  * Make sure that we use atleast automake 1.10
+  * Merge with unstable:
+    - Remove comment about being a daily snapshot.
+    - Readd watch file.
+    - Update copyright file.
+    - Use ${binary:Version} in Depends field instead of ${Source-Version}
+    - Check for precense of Makefile instead of ignoring failures
+      from make distclean, as suggested by lintian.
+    - Change patch system from dpatch to quilt.
+    - Readded m68k java support.
+    - Change DH_COMPAT to a debian/compat file with 4 in it.
+  * Remove separate copyright files for individual packages.
+
+ -- Kurt Roeckx <kurt@roeckx.be>  Sat, 09 Feb 2008 16:23:34 +0000
+
+libtool (2.1a+cvs1.2525+20071016-1) experimental; urgency=low
+
+  * New CVS snapshot.
+  * Dropped java support on arm and m68k architectures.
+  * Added homepage field to debian/control.
+
+ -- Piotr Roszatycki <dexter@debian.org>  Mon, 29 Oct 2007 14:30:17 +0100
+
+libtool (2.1a+cvs1.2460+20070510-1) experimental; urgency=low
+
+  * New CVS snapshot.
+  * Revert patches adapted to new libtool: link_all_deplibs, netbsdelf,
+    version_type.
+  * Build-Depends on automake1.10.
+  * Mark libtool version with Debian tag.
+  * Remove outdated /usr/share/libtool/libtool.m4 symlink.
+  * Revert original order in debian/control file.
+  * Show testsuite.log on failure.
+  * Clean up after build.
+
+ -- Piotr Roszatycki <dexter@debian.org>  Sun, 13 May 2007 22:05:54 +0200
+
+libtool (2.1a+cvs1.2458+20070509-1) experimental; urgency=low
+
+  * New CVS snapshot.
+  * New libltdl7 library package.
+  * Removed all patches.
+  * Compile with gfortran | fortran95-compiler.
+
+ -- Piotr Roszatycki <dexter@debian.org>  Thu, 10 May 2007 00:14:22 +0200
+
+libtool (1.5.22-4) unstable; urgency=low
+
+  * Change gcj build dependency to not !kfreebsd-amd64
+    (Closes: #356388)
+
+ -- Kurt Roeckx <kurt@roeckx.be>  Sat, 11 Mar 2006 19:33:24 +0100
+
+libtool (1.5.22-3) unstable; urgency=low
+
+  * Properly set link_all_deplibs on k*bsd*-gnu.  The previous
+    patch for kfreebsd didn't set it in all cases.  Patch from
+    Aurelien Jarno <aurel32@debian.org> (Closes: #355789)
+  * Make k*bsd*-gnu do the same as on Linux in all cases.  It
+    should behave the same.  Based on patch by Aurelien Jarno.
+  * Don't build depend on gcj on kfreebsd-amd64
+  * Rename bsd.dpatch to netbsdelf.dpatch, since it now
+    only adds support for netbsdelf*-gnu.
+
+ -- Kurt Roeckx <kurt@roeckx.be>  Sat, 11 Mar 2006 16:11:11 +0100
+
+libtool (1.5.22-2) unstable; urgency=low
+
+  * Remove a "--" line from the generate tag for BINCC.  It
+    resulted in "--: command not found" error.  Thanks to 
+    John V. Belmonte for reporting it and Ralf Wildenhues
+    for the fix.  (Closes: #345607)
+
+ -- Kurt Roeckx <kurt@roeckx.be>  Mon,  9 Jan 2006 16:06:58 +0100
+
+libtool (1.5.22-1) unstable; urgency=low
+
+  * New upstream release
+    - libtoolize --ltdl now fails if libltdl3-dev is not installed. 
+      (Closes: #344756)
+  * Also set link_all_deplibs to no on kfreebsd*-gnu.  Patch from
+    Aurelien Jarno <aurel32@debian.org>  (Closes: #341978)
+
+ -- Kurt Roeckx <kurt@roeckx.be>  Mon, 26 Dec 2005 13:36:48 +0100
+
+libtool (1.5.20-2) unstable; urgency=low
+
+  * Add a conflict on libtool1.4 for libltdl3-dev.  They have overlapping
+    files and libtool1.4 should get removed anyway.  (Closes: #329697)
+  * Put usr/share/libtool/libltdl in the libltdl3-dev, so libtoolize --ltdl
+    works again
+  * Don't build-depend gcj on kfreebsd-i386, they don't have it.
+    (Closes: #329703)
+  * Change Standards-Version to 3.6.2, no changes.
+
+ -- Kurt Roeckx <kurt@roeckx.be>  Sun, 25 Sep 2005 16:16:17 +0200
+
+libtool (1.5.20-1) unstable; urgency=low
+
+  * New maintainer (Closes: #302484)
+  * New upstream release (Closes: #265005)
+    - Configure test to detect -fPIC support in combination with other CFLAGS
+      could fail to detect if it's supported. (1.5.16)  (Closes: #219490)
+    - ia64 tests should have been fix, run them again. (1.5.10)
+    - Fix .libs/.libs/libfoo.so link problem when linking against an other lib
+      from the same package. (1.5.8)
+  * Enable gcj on hppa again since gcj-4.0 is available on it.
+  * Enable the test suite on m68k again, slow is not a good reason not to run
+    it.
+  * Move ltdl.m4 from libtool to libltdl-dev package, where it belongs.
+    Add a conflicts/replaces from libltdl-dev to the libtool package.
+  * Remove usr/share/libtool/libltdl from the libtool package
+  * Make the libtool.m4 in /usr/share/libtool a symlink to the one in 
+    /usr/share/aclocal.
+  * libltdl3-dev.preinst: No longer remove the old directory on upgrade.
+    libltdl3-dev.preinst does nothing now so remove the file.
+  * libtool.postinst: We don't run ltconfig anymore, so don't play with
+    cc's alternatives.
+  * Put the config.guess and config.sub symlinks in the package instead
+    of creating them in the libtool.postinst.  Remove the libtool.postinst
+    and libtool.prerm scripts since they do nothing now.
+  * Add AUTHORS, README, THANKS and TODO in the docs dir.
+  * Remove obsolete conflicts/replaces for libltdl0.1 and libltdl0,
+    it's not even in woody.
+  * Split out patches, and convert to using dpatch
+  * Always do a full bootstrap of the configure scripts before
+    building so I only have to patch 1 file.
+  * Embed the debian version in libtool.m4 and ltmain.in/sh
+  * Add a watch file.
+
+ -- Kurt Roeckx <kurt@roeckx.be>  Wed, 14 Sep 2005 21:11:24 +0200
+
+libtool (1.5.6-6) unstable; urgency=low
+
+  * Orphan.
+
+ -- Scott James Remnant <scott@netsplit.com>  Fri,  1 Apr 2005 01:28:13 +0100
+
+libtool (1.5.6-5) unstable; urgency=low
+
+  * Apply patch from upstream to allow five digits in version-info.
+
+ -- Scott James Remnant <scott@netsplit.com>  Tue,  8 Mar 2005 18:12:26 +0000
+
+libtool (1.5.6-4) unstable; urgency=low
+
+  * Correct accidental slide into a native package.
+  * Apply patch to fix memory leak in libltdl.  Closes: #281929.
+  * Usual postinst change to support only gcc 3.4 or gcc 4.0.  Closes: #281708.
+  * Remove build-essential dependencies from libltdl3-dev.  Closes: #260298.
+
+ -- Scott James Remnant <scott@netsplit.com>  Sat, 22 Jan 2005 14:17:59 +0000
+
+libtool (1.5.6-3) unstable; urgency=low
+
+  * Don't build-depend on gcj on netbsd-i386 or hurd-i386.  Closes: #260299.
+  * Apply patch to correct problem with "-lfoo -Ldir -lbar" picking bar up
+    from the same directory as foo, instead of in 'dir'
+
+ -- Scott James Remnant <scott@netsplit.com>  Tue, 26 Oct 2004 10:37:41 +0100
+
+libtool (1.5.6-2) unstable; urgency=low
+
+  * Apply patch from Joel Baker to support Debian GNU/kNetBSD systems
+    with *-*-netbsdelf-gnu triplet.  Closes: #244770.
+  * Fail earlier on invalid version_type so we output a useful error
+    message.  Closes: #247169.
+  * Skip the Non-PIC test on x86-64, it can't handle Non-PIC code inside
+    shared libraries.  Closes: #246746.
+
+ -- Scott James Remnant <scott@netsplit.com>  Tue,  6 Jul 2004 17:52:19 +0100
+
+libtool (1.5.6-1) unstable; urgency=low
+
+  * New upstream release.
+    - Correctly installs libltdl.
+    - Correctly provides shrext_cmds to libltdl.
+      Closes: #242161, #242380, #242457, #242488, #243008, #243033, #243107,
+              #243261.
+
+ -- Scott James Remnant <scott@netsplit.com>  Mon, 12 Apr 2004 18:17:59 +0100
+
+libtool (1.5.4-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Scott James Remnant <scott@netsplit.com>  Sat,  3 Apr 2004 19:10:11 +0100
+
+libtool (1.5.2-2) unstable; urgency=low
+
+  * Remove .svn check from debian/rules, no longer necessary.
+  * Correctly pass CFLAGS to configure.
+  * No longer dlopens libraries with RTLD_GLOBAL.  Closes: #195821, #221811.
+  * Don't add the contents of dependency_libs to the link line when
+    linking programs.  Closes: #191425, #199423, #238681.
+
+ -- Scott James Remnant <scott@netsplit.com>  Sun, 28 Mar 2004 20:08:59 +0100
+
+libtool (1.5.2-1) unstable; urgency=low
+
+  * New upstream release.
+
+    This largely just included our patches from 1.5, there are a couple
+    of additional bug fixes in this release though.
+  * Move to a single libtool.info file.
+
+ -- Scott James Remnant <scott@netsplit.com>  Sun, 25 Jan 2004 14:45:02 +0000
+
+libtool (1.5-9) unstable; urgency=low
+
+  * Apply patch from Robert Millan <zeratul2@wanadoo.es> to complete
+    support for GNU/kNetBSD.  Closes: #224440.
+  * Apply keybuk-precious-files.patch (backported from 1.6) to add
+    an option to prevent the removal of files from the temporary
+    output directory.  Closes: #221420.
+
+ -- Scott James Remnant <scott@netsplit.com>  Sun, 11 Jan 2004 01:33:18 +0000
+
+libtool (1.5-8) unstable; urgency=medium
+
+  * Bring the various copyright files up to par.
+  * Apply patch to infer tagged configuration in link mode with all
+    compiler arguments available, rather than just the first.
+  * Remove the mkdir -p option from when creating a temporary output
+    directory to prevent symlink abuse.
+  * Generate the info files on build as we need a certain --split-size
+    for hysterical raisins.
+
+ -- Scott James Remnant <scott@netsplit.com>  Sat,  3 Jan 2004 14:49:52 +0000
+
+libtool (1.5-7) unstable; urgency=high
+
+  * Add missing 'continue' line when acting on finding -pthread and friends
+    in $deplibs.  This line of code is in all my copies of ltmain, it's in
+    my test package of libtool, it's in the upstream CVS where I comitted it,
+    it's in the patch file I made to do that and is in the 1.4.3 package that
+    used the same patch; but for no apparent reason it vanished from the
+    Debian 1.5-6 package!  Closes: #221467.
+
+ -- Scott James Remnant <scott@netsplit.com>  Tue, 18 Nov 2003 17:08:17 +0000
+
+libtool (1.5-6) unstable; urgency=low
+
+  * Error in the binary targets if a .svn directory exists, to prevent
+    me accidentally shipping them in the diff.  To create binary packages
+    from the svn source add TEST=yes to the debian/rules line.
+    Closes: #219461.
+  * Fix libtoolize so the cd command run when AC_CONFIG_AUX_DIR is used
+    is shown when --dry-run is given.  Closes: #153699.
+  * Yet Another(tm) patch to prevent hardcoding of dependency library
+    rpaths, replacing the one in 1.5-3.  Any path listed in /etc/ld.so.conf
+    is now not rpathed.  This is more palatable upstream.
+  * The Ultimate -pthread Patch(tm), the previous change broke placing
+    -pthread in libs' $deplibs.  This new patch treats the arguments the
+    same for libraries and programs, and even honours them when found
+    in dependency_libs but doesn't place them there first.
+  * Infer near-default configuration when invoked as 'libtool cc' rather
+    than complaining that we can't infer a tag.
+  * Fix -static, -prefer-pic and -prefer-non-pic when used with a tagged
+    configuration.  Closes: #217834.
+  * Synchronise with upstream CVS.  The changes are:
+    - MinGW reverted back to an objdump-base test.
+    See changelog.gz for more detail.
+
+ -- Scott James Remnant <scott@netsplit.com>  Sun, 16 Nov 2003 15:10:15 +0000
+
+libtool (1.5-5) unstable; urgency=low
+
+  * Apply upstream patch to preserve --tag, --debug, --quiet and
+    --silent arguments when invoking ourselves to perform
+    relink or finish modes.  Closes: #214484.
+  * Don't propogate -pthread and friends to dependency_libs, but also
+    don't complain when we find it there.  This fixes the recent GNOME
+    problems without breaking anything else (I hope).
+
+ -- Scott James Remnant <scott@netsplit.com>  Wed, 29 Oct 2003 17:31:07 +0000
+
+libtool (1.5-4) unstable; urgency=low
+
+  * Remove Build-Depends-Indep placing texi2html and texinfo in
+    Build-Depends.  Policy is wrong, the buildds do not ensure these are
+    installed for the "build" target of debian/rules.  Closes: #216492.
+  * Built with dpkg 1.10.10, the latest version ignores the
+    [!hppa !mips !mipsel] clause in Build-Depends.
+
+ -- Scott James Remnant <scott@netsplit.com>  Sun, 19 Oct 2003 16:19:22 +0100
+
+libtool (1.5-3) unstable; urgency=low
+
+  * Synchronise with upstream CVS, in case they decide to skip 1.5.1
+    after all and go straight to 1.6.  The changes are:
+    - GNU/KNetBSD support added.
+    - lt_dlrealloc now part of the libltdl API.  Closes: #120169.
+    See changelog.gz for more detail.
+  * Run 'make check' after build to make sure it all works.
+  * Fix permissions of tests/mdemo2-*.test so "make check" will work.
+  * Move rules to create info files and examples .tar.gz files to
+    the build target so we don't pollute them with stuff from "make check".
+  * Disable demo-nopic test on hppa.
+  * Add /usr/local/lib and /usr/X11R6/lib to sys_lib_dlsearch_path_spec.
+  * Add gcc-3.3 to the list of packages we maintain the /usr/bin/cc
+    alternative for.  Closes: #216349.
+  * Remove dead code from libtool.m4.  Closes: #210378.
+  * Add the various compiler threading options to dependency_libs, and
+    don't barf if we find them.
+  * Merge addition of --no-supress option from HEAD.  Closes: #207475.
+  * Mention that libtool-doc will become non-free after sarge.
+
+ -- Scott James Remnant <scott@netsplit.com>  Wed,  1 Oct 2003 00:27:19 +0100
+
+libtool (1.5-2) unstable; urgency=low
+
+  * Make mdemo2-*.test executable so they don't fail when you go
+    "make check"
+  * Prevent recursion on missing ltmain.sh by checking ltmain.in
+    exists first.  Closes: #164452.
+  * Remove build dependency on gcj on hppa, mips and mipsel to
+    fix build failure.  Closes: #207923.
+  * Remove fallback suggestion of java-compiler, libtool will
+    only support gcj for the forseeable future.
+  * Place NEWS and ChangeLog files in all packages, also add missing
+    ChangeLog.1 file.  Closes: #205458.
+  * Always use pass_all on Linux ELF, host_cpu is irrelevant.
+    Closes: #208552.
+  * Don't pass -nostdlib to gcc when creating an archive so we can
+    throw away all the gcc version-specific hardcoding.  Closes: #206356.
+  * Ensure STRIP variable is properly quoted.
+
+ -- Scott James Remnant <scott@netsplit.com>  Wed, 10 Sep 2003 23:42:48 +0100
+
+libtool (1.5-1) unstable; urgency=low
+
+  * Initial Release of the "multi language" version of GNU Libtool.
+    This is a cooler and more froody version of Libtool than 1.4 was
+    and not only makes C++ libraries properly but does Fortran77 and
+    compiled Java libraries too.  The catch?  It won't work with
+    packages still using Autoconf 2.13.  Either upgrade your
+    configure.in to Autoconf 2.5x, or install the libtool1.4 package.
+    Closes: #190216, #195278, #192918.
+
+ -- Scott James Remnant <scott@netsplit.com>  Sat,  2 Aug 2003 02:08:10 +0100
+
--- libtool-2.2.6a.orig/debian/libtool-doc.doc-base
+++ libtool-2.2.6a/debian/libtool-doc.doc-base
@@ -0,0 +1,9 @@
+Document: libtool-doc
+Title: Libtool Documentation
+Author: The GNU Libtool Team
+Abstract: Portable shared library support for source code packages
+Section: Apps/Programming
+
+Format: HTML
+Index: /usr/share/doc/libtool-doc/libtool.html
+Files: /usr/share/doc/libtool-doc/*.html
--- libtool-2.2.6a.orig/debian/libtool-doc.info
+++ libtool-2.2.6a/debian/libtool-doc.info
@@ -0,0 +1 @@
+doc/libtool.info*
--- libtool-2.2.6a.orig/debian/orig
+++ libtool-2.2.6a/debian/orig
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+# (c) 2000-2007 Piotr Roszatycki <dexter@debian.org> GPL
+
+# This utility downloads upstream's source and
+# generates source package
+
+set -e
+
+if [ -f changelog ]; then
+    cd ..
+elif [ ! -f debian/changelog ]; then
+    echo "can't find changelog file"
+    exit 1
+fi
+
+SRCNAME=libtool
+#SRCVERSION=2.1a
+
+tmpdir=debsource-$SRCNAME
+
+debdir=`pwd`
+
+cd ..
+
+rm -rf $tmpdir
+mkdir $tmpdir
+
+cd $tmpdir
+
+echo "N: Downloading CVS snapshot..."
+
+cvs -z3 -d :pserver:anonymous@cvs.sv.gnu.org:/sources/libtool co libtool
+
+cd libtool
+
+cvs up -dP
+
+find -name CVS -print0 -o -name .cvsignore -print0 | xargs -0 rm -rf
+#AUTOMAKE=automake-1.10 ./bootstrap
+#find -name autom4te.cache -print0 | xargs -0 rm -rf
+
+upsrcver=`grep ^AC_INIT configure.ac | sed 's/.[libtool]//; s/[^[]*\[//; s/].*//'`
+upsrcrev=`libltdl/config/mkstamp < ChangeLog | awk '{ print $1 }'`
+upsrcdate=`libltdl/config/mkstamp < ChangeLog | awk '{ print $2 }' | tr -d '/'`
+
+srcversion="$upsrcver+cvs$upsrcrev+$upsrcdate"
+srcdir=${SRCNAME}-`echo $srcversion | sed -e 's/.*://'`
+srcorig=${SRCNAME}_`echo $srcversion | sed -e 's/.*://'`.orig.tar.gz
+
+echo "N: Creating archive $srcorig..."
+
+cd ..
+
+mv libtool $srcdir
+
+tar zcf ../$srcorig $srcdir
+
+cd ..
+
+rm -rf $tmpdir
+
+echo "N: Done."
--- libtool-2.2.6a.orig/debian/libtoolize.1
+++ libtool-2.2.6a/debian/libtoolize.1
@@ -0,0 +1,63 @@
+.TH LIBTOOLIZE 1 "August 2003" "Library Support" "User Manuals"
+.SH NAME
+libtoolize \- add libtool support to your package
+.SH SYNOPSIS
+.B libtoolize
+.I "[OPTION]..."
+.SH "DESCRIPTION"
+The `libtoolize' program provides a standard way to add libtool
+support to your package.  In the future, it may implement better usage
+checking, or other features to make libtool even easier to use.
+.SH "OPTIONS"
+libtoolize accepts the following options:
+.TP
+.B \-\-automake
+Work silently, and assume that Automake libtool support is used.
+
+`libtoolize --automake' is used by Automake to add libtool files to
+your package, when `AC_PROG_LIBTOOL' appears in your `configure.in'.
+.TP
+.B \-\-copy, \-c
+Copy files from the libtool data directory rather than creating
+symlinks.
+.TP
+.B \-\-debug
+Enable verbose shell tracing
+.TP
+.B \-\-dry-run, \-n
+Don't run any commands that modify the file system, just print them
+out.
+.TP
+.B \-\-force, \-f
+Replace existing libtool files.  By default, `libtoolize' won't
+overwrite existing files.
+.TP
+.B \-\-help
+Display a help message and exit.
+.TP
+.B \-\-ltdl
+Install libltdl in a subdirectory of your package.
+.TP
+.B \-\-ltdl\-tar
+Add the file `libltdl.tar.gz' to your package.
+.TP
+.B \-\-version
+Print `libtoolize' version information and exit.
+
+If `libtoolize' detects an explicit call to `AC_CONFIG_AUX_DIR'
+in your `configure.in', it will put the files in the specified directory.
+
+`libtoolize' displays hints for adding libtool support to your
+package, as well.
+
+.SH "SEE ALSO"
+.BR libtool (1),
+.BR automake (1)
+.br
+`libtool', `libtoolize' and `automake' are fully documented via the
+Info system.
+.SH AUTHOR
+This manual page was written by Frederic Lepied <Lepied@debian.org>,
+for the Debian GNU/Linux system (but may be used by others).
+It was updated by Ossama Othman <ossama@debian.org> and updated for
+Libtool 1.5 by Scott James Remnant <scott@netsplit.com>.
--- libtool-2.2.6a.orig/debian/README.Debian
+++ libtool-2.2.6a/debian/README.Debian
@@ -0,0 +1,25 @@
+GNU Libtool
+-----------
+
+This is the Debian package of GNU Libtool.
+
+You do not need this package to compile software that uses Libtool,
+that software will use an included copy of the libtool script it was
+developed with.  Of course if you are developing or maintaining such
+software this is the package for you.
+
+If you are developing software that still uses Autoconf 2.13 you will
+be unable to use this version of Libtool.  It is strongly recommended
+that you update the software to use Autoconf 2.5x.  If that is not
+possible you will need to install the deprecated GNU Libtool 1.4
+release available in Debian as the 'libtool1.4' package.
+
+
+GNU Libtool is split into four different Debian packages:
+
+	libtool		Contains the libtool script and autotools files.
+	libtool-doc	Contains the libtool documentation.
+	libltdl3	Contains the libltdl runtime library.
+	libltdl3-dev	Contains the libltdl headers and static library.
+
+ -- Scott James Remnant <scott@netsplit.com>, Wed, 30 Jul 2003 21:46:01 +0100
--- libtool-2.2.6a.orig/debian/libltdl7.docs
+++ libtool-2.2.6a/debian/libltdl7.docs
@@ -0,0 +1,3 @@
+libltdl/README
+NEWS
+ChangeLog.*
--- libtool-2.2.6a.orig/debian/libtool.docs
+++ libtool-2.2.6a/debian/libtool.docs
@@ -0,0 +1,7 @@
+README
+AUTHORS
+THANKS
+NEWS
+TODO
+ChangeLog.*
+
--- libtool-2.2.6a.orig/debian/libtool.files
+++ libtool-2.2.6a/debian/libtool.files
@@ -0,0 +1,3 @@
+usr/bin
+usr/share/libtool/config/*
+usr/share/aclocal/*
--- libtool-2.2.6a.orig/debian/rules
+++ libtool-2.2.6a/debian/rules
@@ -0,0 +1,214 @@
+#!/usr/bin/make -f
+# debian/rules for the Debian GNU Libtool package.
+# Copyright © 2003, 2004 Scott James Remnant <scott@netsplit.com>
+
+# Uncomment this to turn on verbose mode. 
+#export DH_VERBOSE=1
+
+DEBIAN_REVISION=$(strip $(shell dpkg-parsechangelog | awk -F: '/^Version:/ {print $$NF}'))
+
+# libltdl needs to conform to policy
+CFLAGS = -Wall -g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	INSTALL_PROGRAM += -s
+endif
+
+# Build libltdl the right way (tm)
+DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
+	confflags += --build=$(DEB_HOST_GNU_TYPE)
+	make_check = yes
+else
+	confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
+	make_check = no
+endif
+
+ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+	make_check = no
+endif
+
+# Takes too long
+#ifeq (m68k, $(DEB_HOST_ARCH))
+#	make_check = no
+#endif
+
+patch: patch-stamp
+patch-stamp:
+	QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
+	touch patch-stamp
+
+unpatch:
+	QUILT_PATCHES=debian/patches quilt pop -a || test $$? = 2
+	rm -rf patch-stamp debian/patched
+
+clean: clean-patched unpatch
+clean-patched:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp config-stamp
+	dh_clean
+
+	[ ! -f Makefile ] || $(MAKE) -k distclean
+	-rm config.log
+	-rm -f *demo*.tar.gz
+	find . -name 'stamp-*' | xargs rm -f
+	find . -name 'configure' | xargs rm -f
+	rm -f *.in */*.in
+	rm -f *.m4 */*.m4
+	find tests -name '*.in' -o -name '*.m4' | xargs rm -f
+	find libltdl/config -type f -a ! -name '*.m4sh' -a ! -name 'mkstamp' | xargs rm -f
+	rm -f libltdl/Makefile.am
+	rm -f libltdl/m4/ltversion.m4
+	rm -f COPYING INSTALL commit tests-failed
+	rm -f doc/libtool.info-1 doc/libtool.info-2
+	rm -f tests/testsuite
+	rm -f doc/version.texi doc/notes.txt doc/stamp-vti doc/libtool.info
+# Undo the version change if there is any.
+	sed -i -e 's/@VERSION@.*/@VERSION@/' libtoolize.m4sh
+	sed -i -e 's/^\(#.*@VERSION@\).*/\1/' libltdl/config/ltmain.m4sh
+	sed -i -e 's/^VERSION.*/VERSION=@VERSION@/' libltdl/config/ltmain.m4sh
+
+config: config-stamp
+Makefile: config-stamp
+config-stamp: patch-stamp
+	dh_testdir
+
+#	These go into the libtool-doc `examples' directory.
+#	Create them while we still have a clean source tree
+	for demo in cdemo demo depdemo f77demo fcdemo mdemo mdemo2 pdemo tagdemo; do \
+	    GZIP=--best tar zcf ./$$demo.tar.gz tests/$$demo; \
+	done
+
+	sed -i -e 's/^#.*progname.*@VERSION@$$/& Debian-$(DEBIAN_REVISION)/' libtoolize.m4sh
+	sed -i -e 's/^#.*progname.*@VERSION@$$/& Debian-$(DEBIAN_REVISION)/' libltdl/config/ltmain.m4sh
+	sed -i -e 's/^VERSION.*/VERSION="@VERSION@ Debian-$(DEBIAN_REVISION)"/' libltdl/config/ltmain.m4sh
+	./bootstrap
+	CONFIG_SHELL=/bin/bash /bin/bash ./configure --prefix=/usr $(confflags) CFLAGS="$(CFLAGS)"
+	touch config-stamp
+
+
+build: build-stamp
+build-stamp: config-stamp
+	dh_testdir
+
+#	Fix some permissions
+	chmod a+x tests/mdemo2-*.test
+
+	$(MAKE)
+
+#	The system libtool script in Debian must be able to support
+#	invoking gcc as cc
+	echo '# ### BEGIN LIBTOOL TAG CONFIG: BINCC' >> libtool
+	sed -n -e '/^# ### BEGIN LIBTOOL CONFIG/,/^# ### END LIBTOOL CONFIG/p' < libtool \
+		| grep -B 2 -A 1 -e '^LTCC=' -e '^CC=' \
+		| sed '/^--/d;s/gcc/cc/g' >> libtool
+	echo '# ### END LIBTOOL TAG CONFIG: BINCC' >> libtool
+	echo >> libtool
+
+#	The system libtool script in Debian must be able to support
+#	invoking g++ both by the g++ and c++ names.
+	sed -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: CXX$$/,/^# ### END LIBTOOL TAG CONFIG: CXX$$/p' < libtool \
+		| sed -e 's/CONFIG: CXX/CONFIG: BINCXX/g' \
+		      -e 's/g++/c++/g' >> libtool
+	echo >> libtool
+
+#	Add our BINCC and BINCXX tags
+	sed -e 's/^\(available_tags\)=\"\(.*\)\"/\1=\"\2 BINCC BINCXX\"/' \
+		< libtool > libtool.tags
+	mv libtool.tags libtool
+
+#	Don't hardcode gcc path information, and don't use nostdlib
+	sed -e 's/^\(predep_objects\)=.*/\1=""/' \
+	    -e 's/^\(postdep_objects\)=.*/\1=""/' \
+	    -e 's/^\(compiler_lib_search_path\)=.*/\1=""/' \
+	    -e 's:^\(sys_lib_search_path_spec\)=.*:\1="/lib/ /usr/lib/ /usr/X11R6/lib/ /usr/local/lib/":' \
+	    -e 's/^\(archive_cmds=\".*\) -nostdlib /\1 /' \
+	    -e 's/^\(archive_expsym_cmds=\".*\) -nostdlib /\1 /' \
+	    < libtool > libtool.gcc-indep
+	mv libtool.gcc-indep libtool
+
+#	Make libtool executable again
+	chmod 755 libtool
+
+#	This generated HTML page goes into libtool-doc.
+	cd doc && makeinfo libtool.texi
+	cd doc && texi2html -monolithic libtool.texi
+
+
+ifeq ($(make_check), yes)
+#	Now make sure it works
+	-$(MAKE) check || touch tests-failed
+	-cat tests/testsuite.log
+	#@test ! -f tests-failed
+endif
+
+	touch build-stamp
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	$(MAKE) prefix=`pwd`/debian/tmp/usr install
+
+# Build architecture-independent files here.
+binary-indep: build install
+	dh_testdir -i
+	dh_testroot -i
+
+	dh_movefiles -i
+
+	dh_installdocs -i
+	dh_installinfo -plibtool-doc
+	dh_installexamples -i
+	dh_installchangelogs -i ChangeLog
+	dh_link -i
+	dh_compress -i
+	dh_fixperms -i
+	dh_installdeb -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir -a
+	dh_testroot -a
+
+	dh_movefiles -a -Nlibtool
+	dh_movefiles -plibtool
+
+	# Create symlinks to the one in autotools-dev
+	rm -f debian/libtool/usr/share/libtool/config/config.guess
+	ln -s ../../misc/config.guess debian/libtool/usr/share/libtool/config
+	rm -f debian/libtool/usr/share/libtool/config/config.sub
+	ln -s ../../misc/config.sub debian/libtool/usr/share/libtool/config
+
+	dh_installdocs -plibtool
+	dh_installdocs -plibltdl7
+	mkdir -p debian/libltdl-dev/usr/share/doc
+	cd debian/libltdl-dev/usr/share/doc && ln -sf libltdl7 libltdl-dev
+	dh_installman -plibtool debian/libtool.1 debian/libtoolize.1
+	dh_installchangelogs -plibtool ChangeLog
+	dh_installchangelogs -plibltdl7 ChangeLog
+	dh_strip -a
+	dh_link -a
+	dh_compress -a
+	dh_fixperms -a
+	dh_makeshlibs -a -V
+	dh_installdeb -a
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+binary: binary-indep binary-arch
+.PHONY: build clean config patch unpatch binary-indep binary-arch binary install
--- libtool-2.2.6a.orig/debian/libltdl7.files
+++ libtool-2.2.6a/debian/libltdl7.files
@@ -0,0 +1 @@
+usr/lib/libltdl.so.*
--- libtool-2.2.6a.orig/debian/libltdl-dev.files
+++ libtool-2.2.6a/debian/libltdl-dev.files
@@ -0,0 +1,6 @@
+usr/include
+usr/lib/libltdl.la
+usr/lib/libltdl.so
+usr/lib/libltdl.a
+usr/share/aclocal/ltdl.m4
+usr/share/libtool/libltdl
--- libtool-2.2.6a.orig/debian/copyright
+++ libtool-2.2.6a/debian/copyright
@@ -0,0 +1,55 @@
+This is the Debian package of GNU Libtool.
+
+The Debian package is currently maintained by Kurt Roeckx <kurt@roeckx.be>
+
+libtool is:
+Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+	Free Software Foundation, Inc.
+Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 
+
+
+Additional information about Libtool is available at:
+
+	http://www.gnu.org/software/libtool/
+
+The upstream sources were obtained from:
+
+	ftp://ftp.gnu.org/pub/gnu/libtool/
+
+
+License:
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+As a special exception to the GNU General Public License, if you
+distribute this file as part of a program that contains a
+configuration script generated by Autoconf, you may include it under
+the same distribution terms that you use for the rest of that program.
+
+On Debian GNU/Linux systems, the complete text of the GNU General Public
+License can be found in `/usr/share/common-licenses/GPL'.
+
+
+The documentation is:
+Copyright (C) 1996-2003, 2005-2007 Free Software Foundation, Inc.
+
+With the following license:
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.2
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, with no Front-Cover Texts,
+and with no Back-Cover Texts.  A copy of the license is included in
+the section entitled "GNU Free Documentation License".
+
+On Debian GNU/Linux systems, the complete text of the GNU
+Free Documentation License can be found in
+`/usr/share/common-licenses/GFDL'.
+
--- libtool-2.2.6a.orig/debian/control
+++ libtool-2.2.6a/debian/control
@@ -0,0 +1,84 @@
+Source: libtool
+Build-Depends: debhelper (>= 4.0), texi2html, texinfo, file, gfortran | fortran95-compiler, gcj [!hppa !hurd-i386], automake (>= 1:1.10), autoconf, autotools-dev, quilt
+Build-Conflicts: automake1.9
+Section: devel
+Priority: optional
+Maintainer: Kurt Roeckx <kurt@roeckx.be>
+Uploaders: Andres Salomon <dilinger@debian.org>
+Standards-Version: 3.8.1
+Homepage: http://www.gnu.org/software/libtool/
+
+Package: libtool
+Architecture: any
+Section: devel
+Depends: gcc | c-compiler, cpp, libc6-dev | libc-dev, file, autotools-dev
+Suggests: libtool-doc, autoconf (>> 2.50), automaken, gfortran | fortran95-compiler, gcj
+Conflicts: autoconf (<= 2.12), automake (<= 1.3), libtool1.4
+Recommends: libltdl-dev
+Description: Generic library support script
+ This is GNU libtool, a generic library support script.  Libtool hides
+ the complexity of generating special library types (such as shared
+ libraries) behind a consistent interface.  To use libtool, add the
+ new generic library building commands to your Makefile, Makefile.in,
+ or Makefile.am.  See the documentation for details.  Libtool supports
+ building static libraries on all platforms.
+ .
+ Libtool supports generation of C, C++, Fortran and Java libraries.
+
+Package: libtool-doc
+Architecture: all
+Section: doc
+Conflicts: libtool1.4-doc
+Description: Generic library support script
+ This package contains the GNU libtool documentation.
+ .
+ GNU libtool is generic library support script.  Libtool hides
+ the complexity of generating special library types (such as shared
+ libraries) behind a consistent interface.  To use libtool, add the
+ new generic library building commands to your Makefile, Makefile.in,
+ or Makefile.am.  See the documentation for details.  Libtool supports
+ building static libraries on all platforms.
+
+Package: libltdl7
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}
+Description: A system independent dlopen wrapper for GNU libtool
+ This package contains the run-time libltdl library.
+ .
+ A small library that aims at hiding the various difficulties of
+ dlopening libraries from programmers.  It is a system independent
+ dlopen wrapper for GNU libtool.
+ .
+ It supports the following dlopen interfaces:
+   * dlopen (Solaris, Linux and various BSD flavors)
+   * shl_load (HP-UX)
+   * LoadLibrary (Win16 and Win32)
+   * load_add_on (BeOS)
+   * GNU DLD (emulates dynamic linking for static libraries)
+   * libtool's dlpreopen
+
+Package: libltdl-dev
+Architecture: any
+Section: libdevel
+Suggests: libtool-doc
+Recommends: libtool
+Conflicts: libtool (<< 1.5.20), libtool1.4, libltdl3-dev, libltdl7-dev
+Replaces: libtool (<< 1.5.20), libltdl3-dev, libltdl7-dev
+Provides: libltdl3-dev, libltdl7-dev
+Depends: libltdl7 (= ${binary:Version})
+Description: A system independent dlopen wrapper for GNU libtool
+ This package contains the header files and static libraries for the
+ libltdl package.
+ .
+ A small library that aims at hiding the various difficulties of
+ dlopening libraries from programmers.  It is a system independent
+ dlopen wrapper for GNU libtool.
+ .
+ It supports the following dlopen interfaces:
+   * dlopen (Solaris, Linux and various BSD flavors)
+   * shl_load (HP-UX)
+   * LoadLibrary (Win16 and Win32)
+   * load_add_on (BeOS)
+   * GNU DLD (emulates dynamic linking for static libraries)
+   * libtool's dlpreopen
--- libtool-2.2.6a.orig/debian/libtool-doc.examples
+++ libtool-2.2.6a/debian/libtool-doc.examples
@@ -0,0 +1 @@
+*demo.tar.gz
--- libtool-2.2.6a.orig/debian/libtool.1
+++ libtool-2.2.6a/debian/libtool.1
@@ -0,0 +1,106 @@
+.TH LIBTOOL 1  "August 2003" "Library Support" "User Manuals"
+.SH NAME
+libtool \- Provide generalized library-building support services.
+.SH SYNOPSIS
+.B libtool
+.BI [ OPTION ] ...
+.BI [ MODE\-ARG ] ...
+.SH "DESCRIPTION"
+The `libtool' program provides a standard way to generate both static
+and shared libraries.  It hides the complexities of platform\-specific
+library generation behind an interface that is the same across all
+platforms supported by libtool.
+.SH "OPTIONS"
+libtool accepts the following options:
+.TP
+.B \-\-config
+Display libtool configuration variables and exit.
+.TP
+.B \-\-debug
+Dump a trace of shell script execution to standard output.  This
+produces a lot of output, so you may wish to pipe it to `less' (or
+`more') or redirect to a file.
+.TP
+.BI \-n | \-\-dry-run
+Don't create, modify, or delete any files, just show what commands
+would be executed by `libtool'.
+.TP
+.B \-\-features
+Display basic configuration options.  This provides a way for packages
+to determine whether shared or static libraries will be built.
+.TP
+.B \-\-finish
+Same as
+.BR \-\-mode=finish .
+.TP
+.B \-\-help
+Display a help message and exit.  If
+.BI \-\-mode= MODE
+is specified, then detailed help for
+.I MODE
+is displayed.
+.TP
+.BI \-\-mode= MODE
+Use
+.I MODE
+as the operation mode.  By default, the operation mode is inferred
+from the
+.IR MODE\-ARGS .
+
+If
+.I MODE
+is specified, it must be one of the following:
+.IP
+.B clean
+Remove files from the build directory
+.IP
+.B compile
+Compile a source file into a `libtool' object.
+.IP
+.B execute
+Automatically set the library path, then run a program.
+.IP
+.B finish
+Complete the installation of libtool libraries.
+.IP
+.B install
+Install libraries or executables.
+.IP
+.B link
+Create a library or an executable.
+.IP
+.B uninstall
+Remove libraries from an installed directory.
+.TP
+.B \-\-quiet
+Same as `\-\-silent'.
+.TP
+.B \-\-silent
+Don't print informational messages.
+.TP
+.B \-\-tag=TAG
+Use configuration variables from tag 
+.I TAG
+.TP
+.B \-\-version
+Print version information.
+.P
+The
+.I MODE\-ARGS
+are a variable number of arguments, depending on the selected
+operation mode.  In general, each
+.I MODE\-ARG
+is interpreted by programs libtool invokes, rather than libtool itself.
+.SH "SEE ALSO"
+.BR libtoolize (1),
+.BR automake (1)
+.br
+`libtool', `libtoolize' and `automake' are fully documented via the
+Info system.
+.SH AUTHOR
+This manual page was created by Ossama Othman <ossama@debian.org>.  It
+is based on the "Invoking Libtool" menu entry in the `libtool' TEXINFO
+documentation, and the output from the
+.B \-\-help
+option.  It was updated for Libtool 1.5 by
+Scott James Remnant <scott@netsplit.com>.
--- libtool-2.2.6a.orig/debian/patches/nopic-mips.patch
+++ libtool-2.2.6a/debian/patches/nopic-mips.patch
@@ -0,0 +1,13 @@
+Index: libtool-2.2.6a/tests/demo-nopic.test
+===================================================================
+--- libtool-2.2.6a.orig/tests/demo-nopic.test	2008-11-18 21:11:29.000000000 +0000
++++ libtool-2.2.6a/tests/demo-nopic.test	2008-11-18 21:12:41.000000000 +0000
+@@ -26,7 +26,7 @@
+ . tests/defs || exit 1
+ 
+ case "$host" in
+-hppa*|x86_64*|s390*)
++hppa*|x86_64*|s390*|mips*)
+ 	func_skip "$host doesn't like non-PIC shared libs"
+ 	;;
+ *-solaris*|*-sunos*)
--- libtool-2.2.6a.orig/debian/patches/deplib_binary.patch
+++ libtool-2.2.6a/debian/patches/deplib_binary.patch
@@ -0,0 +1,34 @@
+Index: libtool-2.2.6a/libltdl/config/ltmain.m4sh
+===================================================================
+--- libtool-2.2.6a.orig/libltdl/config/ltmain.m4sh	2009-04-06 23:08:48.000000000 +0200
++++ libtool-2.2.6a/libltdl/config/ltmain.m4sh	2009-04-06 23:15:32.000000000 +0200
+@@ -4905,19 +4905,19 @@
+ 	    # It is a libtool convenience library, so add in its objects.
+ 	    convenience="$convenience $ladir/$objdir/$old_library"
+ 	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
++	    tmp_libs=
++	    for deplib in $dependency_libs; do
++	      deplibs="$deplib $deplibs"
++	      if $opt_duplicate_deps ; then
++		case "$tmp_libs " in
++		*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
++		esac
++	      fi
++	      tmp_libs="$tmp_libs $deplib"
++	    done
+ 	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
+ 	    func_fatal_error "\`$lib' is not a convenience library"
+ 	  fi
+-	  tmp_libs=
+-	  for deplib in $dependency_libs; do
+-	    deplibs="$deplib $deplibs"
+-	    if $opt_duplicate_deps ; then
+-	      case "$tmp_libs " in
+-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+-	      esac
+-	    fi
+-	    tmp_libs="$tmp_libs $deplib"
+-	  done
+ 	  continue
+ 	fi # $pass = conv
+ 
--- libtool-2.2.6a.orig/debian/patches/link_all_deplibs.patch
+++ libtool-2.2.6a/debian/patches/link_all_deplibs.patch
@@ -0,0 +1,53 @@
+## Do not link against deplibs.  This is not needed for shared libs
+## on atleast ELF systems since those already know which libs they
+## need themself.  This seems to break a few things and will be fixed
+## in a better way in a future upstream version.
+
+Index: libtool-2.2.6a/libltdl/config/ltmain.m4sh
+===================================================================
+--- libtool-2.2.6a.orig/libltdl/config/ltmain.m4sh	2009-04-07 19:45:25.000000000 +0200
++++ libtool-2.2.6a/libltdl/config/ltmain.m4sh	2009-04-07 23:32:35.000000000 +0200
+@@ -4591,7 +4591,10 @@
+ 	case $pass in
+ 	dlopen) libs="$dlfiles" ;;
+ 	dlpreopen) libs="$dlprefiles" ;;
+-	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
++	link)
++	  libs="$deplibs %DEPLIBS%"
++	  test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
++	  ;;
+ 	esac
+       fi
+       if test "$linkmode,$pass" = "lib,dlpreopen"; then
+Index: libtool-2.2.6a/libltdl/m4/libtool.m4
+===================================================================
+--- libtool-2.2.6a.orig/libltdl/m4/libtool.m4	2009-04-07 19:45:25.000000000 +0200
++++ libtool-2.2.6a/libltdl/m4/libtool.m4	2009-04-07 23:32:35.000000000 +0200
+@@ -4182,6 +4182,9 @@
+   cygwin* | mingw* | cegcc*)
+     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+   ;;
++  linux* | k*bsd*-gnu)
++    _LT_TAGVAR(link_all_deplibs, $1)=no
++  ;;
+   *)
+     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+   ;;
+@@ -4246,6 +4249,9 @@
+   openbsd*)
+     with_gnu_ld=no
+     ;;
++  linux* | k*bsd*-gnu)
++    _LT_TAGVAR(link_all_deplibs, $1)=no
++    ;;
+   esac
+ 
+   _LT_TAGVAR(ld_shlibs, $1)=yes
+@@ -4603,6 +4609,7 @@
+ 	if test "$aix_use_runtimelinking" = yes; then
+ 	  shared_flag="$shared_flag "'${wl}-G'
+ 	fi
++	_LT_TAGVAR(link_all_deplibs, $1)=no
+       else
+ 	# not using gcc
+ 	if test "$host_cpu" = ia64; then
--- libtool-2.2.6a.orig/debian/patches/version_type.patch
+++ libtool-2.2.6a/debian/patches/version_type.patch
@@ -0,0 +1,14 @@
+Index: libtool-2.2.6a/libltdl/config/ltmain.m4sh
+===================================================================
+--- libtool-2.2.6a.orig/libltdl/config/ltmain.m4sh	2008-11-18 21:12:39.000000000 +0000
++++ libtool-2.2.6a/libltdl/config/ltmain.m4sh	2008-11-18 21:12:41.000000000 +0000
+@@ -5767,6 +5767,9 @@
+ 	    revision="$number_minor"
+ 	    lt_irix_increment=no
+ 	    ;;
++	  *)
++	    func_fatal_configuration "$modename: unknown library version type \`$version_type'"
++	    ;;
+ 	  esac
+ 	  ;;
+ 	no)
--- libtool-2.2.6a.orig/debian/patches/lt_dlopenext.patch
+++ libtool-2.2.6a/debian/patches/lt_dlopenext.patch
@@ -0,0 +1,29 @@
+2009-02-03  Kurt Roeckx <kurt@roeckx.be>
+
+	lt_dlopenext sets error upon successful library load.
+	* libltdl/ltdl.c (lt_dlopenadvise): Fix bogus error on
+	successful loading of library with lt_dlopenext.
+	Report by Kaiwang Chen in <http://bugs.debian.org/510006>.
+
+diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c
+index 6e19599..80b5675 100644
+--- a/libltdl/ltdl.c
++++ b/libltdl/ltdl.c
+@@ -1614,6 +1614,9 @@ lt_dlopenadvise (const char *filename, lt_dladvise advise)
+ {
+   lt_dlhandle	handle	= 0;
+   int		errors	= 0;
++  const char *	saved_error	= 0;
++
++  LT__GETERROR (saved_error);
+ 
+   /* Can't have symbols hidden and visible at the same time!  */
+   if (advise && advise->is_symlocal && advise->is_symglobal)
+@@ -1650,6 +1653,7 @@ lt_dlopenadvise (const char *filename, lt_dladvise advise)
+ 
+ #if defined(LT_MODULE_EXT)
+       /* Try appending SHLIB_EXT.   */
++      LT__SETERRORSTR (saved_error);
+       errors = try_dlopen (&handle, filename, shlib_ext, advise);
+ 
+       /* As before, if the file was found but loading failed, return now
--- libtool-2.2.6a.orig/debian/patches/bogus_directory.patch
+++ libtool-2.2.6a/debian/patches/bogus_directory.patch
@@ -0,0 +1,21 @@
+2009-02-28  Török Edwin  <edwintorok@gmail.com>  (tiny change)
+	    Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+	Do not add bogus directory arguments to link command lines.
+	* libltdl/config/ltmain.m4sh (func_mode_link): Ensure $path is
+	always initialized before it is used.  Reported for zsh, for
+	which $path contains $PATH entries even after "emulate sh", see
+	<http://bugs.debian.org/517501>.
+
+Index: libtool-2.2.6a/libltdl/config/ltmain.m4sh
+===================================================================
+--- libtool-2.2.6a.orig/libltdl/config/ltmain.m4sh	2009-04-07 19:48:31.000000000 +0200
++++ libtool-2.2.6a/libltdl/config/ltmain.m4sh	2009-04-07 23:04:27.000000000 +0200
+@@ -5454,6 +5454,7 @@
+ 	  if test "$link_all_deplibs" != no; then
+ 	    # Add the search paths of all dependency libraries
+ 	    for deplib in $dependency_libs; do
++	      path=
+ 	      case $deplib in
+ 	      -L*) path="$deplib" ;;
+ 	      *.la)
--- libtool-2.2.6a.orig/debian/patches/netbsdelf.patch
+++ libtool-2.2.6a/debian/patches/netbsdelf.patch
@@ -0,0 +1,74 @@
+## Add support for netbsdelf*-gnu
+
+Index: libtool-2.2.6a/libltdl/m4/libtool.m4
+===================================================================
+--- libtool-2.2.6a.orig/libltdl/m4/libtool.m4	2008-11-18 21:12:39.000000000 +0000
++++ libtool-2.2.6a/libltdl/m4/libtool.m4	2008-11-18 21:12:41.000000000 +0000
+@@ -2485,6 +2485,18 @@
+   dynamic_linker='GNU/Linux ld.so'
+   ;;
+ 
++netbsdelf*-gnu)
++  version_type=linux
++  need_lib_prefix=no
++  need_version=no
++  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
++  soname_spec='${libname}${release}${shared_ext}$major'
++  shlibpath_var=LD_LIBRARY_PATH
++  shlibpath_overrides_runpath=no
++  hardcode_into_libs=yes
++  dynamic_linker='NetBSD ld.elf_so'
++  ;;
++
+ netbsd*)
+   version_type=sunos
+   need_lib_prefix=no
+@@ -3076,7 +3088,7 @@
+   lt_cv_deplibs_check_method=pass_all
+   ;;
+ 
+-netbsd*)
++netbsd* | netbsdelf*-gnu)
+   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+   else
+@@ -3757,7 +3769,7 @@
+ 	    ;;
+ 	esac
+ 	;;
+-      netbsd*)
++      netbsd* | netbsdelf*-gnu)
+ 	;;
+       *qnx* | *nto*)
+         # QNX uses GNU C++, but need to define -shared option too, otherwise
+@@ -4431,7 +4443,7 @@
+       fi
+       ;;
+ 
+-    netbsd*)
++    netbsd* | netbsdelf*-gnu)
+       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ 	wlarc=
+@@ -4845,7 +4857,7 @@
+       _LT_TAGVAR(link_all_deplibs, $1)=yes
+       ;;
+ 
+-    netbsd*)
++    netbsd* | netbsdelf*-gnu)
+       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ 	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+       else
+Index: libtool-2.2.6a/libltdl/m4/ltdl.m4
+===================================================================
+--- libtool-2.2.6a.orig/libltdl/m4/ltdl.m4	2008-11-18 21:11:35.000000000 +0000
++++ libtool-2.2.6a/libltdl/m4/ltdl.m4	2008-11-18 21:12:41.000000000 +0000
+@@ -487,7 +487,7 @@
+     # at 6.2 and later dlopen does load deplibs.
+     lt_cv_sys_dlopen_deplibs=yes
+     ;;
+-  netbsd*)
++  netbsd* | netbsdelf*-gnu)
+     lt_cv_sys_dlopen_deplibs=yes
+     ;;
+   openbsd*)
--- libtool-2.2.6a.orig/debian/patches/series
+++ libtool-2.2.6a/debian/patches/series
@@ -0,0 +1,7 @@
+link_all_deplibs.patch
+deplib_binary.patch
+netbsdelf.patch
+version_type.patch
+nopic-mips.patch
+bogus_directory.patch
+lt_dlopenext.patch
--- libtool-2.2.6a.orig/.pc/.version
+++ libtool-2.2.6a/.pc/.version
@@ -0,0 +1 @@
+2
