This page is a mirror of http://people.debian.org/~keybuk/libtool-updating.html.
All commands are intended to be run from your package's top-level source directory.
Find out which version of Libtool your package uses:
$ find . -name ltmain.sh -print0 | xargs -0 grep -H ^VERSION=
If your package uses 1.5 or 1.5.x you want
the libtool package.
If your package uses 1.4 or 1.4.x you want
the libtool1.4 package.
Find out which version of Automake your package uses:
$ head -1 Makefile.in
If your package uses 1.8 or 1.8.x you want
the automake1.8 package.
If your package uses 1.7 or 1.7.x you want
the automake1.7 package.
If your package uses 1.6 or 1.6.x you want
the automake1.6 package.
If your package uses 1.4 or 1.4.x you want
the automake1.4 package.
Find out which version of Autoconf your package uses:
$ grep Generated configure | head -1
If yor package uses 2.5x you want
the autoconf package.
If yor package uses 2.13 you want
the autoconf2.13 package.
Install or upgrade the appropriate packages and the
autotools-dev package:
$ apt-get install libtool automake autoconf autotools-dev
Use the libtoolize tool to bring the ltmain.sh,
config.guess and config.sub scripts in your
package up to date:
$ libtoolize --copy --force
Use the aclocal tool to place the latest version of the
libtool.m4 macros into your aclocal.m4 file:
$ aclocal-1.8
Be sure to replace the 1.8 with either 1.7,
1.6 or 1.4 if appropriate.
Use the autoconf to use the new macros to bring your
configure script up to date:
$ autoconf
This should run the right version, if in doubt run either
autoconf2.50 or autoconf2.13 instead.
Repeat steps 5–7 for every additional directory containing
a configure script and ltmain.sh alongside
(or in a AC_CONFIG_AUX_DIR).
Unfortunately aclocal is a somewhat brute-force tool. For
every macro you use in your configure.{in,ac} file it
includes a verbatim copy of all files in /usr/share/aclocal
that define it.
This can cause problems if the original aclocal.m4 file
contained macros not available on your system. These will be lost after
aclocal is run.
Fortunately there's no magic behind the format of this file and it can be modified manually. This should be performed instead of step 6, you will still need to perform step 7 afterwards.
Restore the original aclocal.m4 file.
Open it in your favourite text editor.
Locate the line beginning:
# libtool.m4 - Configure libtool for the host systemRemember this line number or place your editor's equivalent of a mark here.
Locate the line beginning:
AC_DEFUN([LT_AC_PROG_SED],Gradually scroll down until you see the following lines:
AC_MSG_RESULT([$SED]) ])
Delete from the mark you placed in step 3 to the line containing just
]) from step 4.
Save the new file and exit your editor.
Append the new Libtool macros to this file:
$ cat /usr/share/aclocal/libtool.m4 >> aclocal.m4
This can all, of course, be performed using UNIX utilities:
$ sed -e '/^# libtool.m4/,/^AC_MSG_RESULT(\[$SED])/{N;d}' \
aclocal.m4 > aclocal.m4_
$ cat aclocal.m4_ /usr/share/aclocal/libtool.m4 > aclocal.m4
If you've followed these steps correctly your problems should have gone. If they haven't then you've most likely got either an upstream of hasn't the faintest idea how to use the GNU AutoTools properly; or worse, one who thinks they know better than anyone else.
Here's some ideas of things to check for and remove:
libtool.m4 in aclocal.m4,
maybe without the guard header.libtool.m4 in acinclude.m4 or
a directory of macros inside the package.config.guess, config.sub
or ltmain.sh lying around.configure scripts,
go back to the steps above and repeat the appropriate ones in these
directories as well.Makefile rules that play with any Autoconf, Automake
or Libtool generated files. Especially check for files called
GNUmakefile or makefile.