How libtool custom script is generated by configure?
Asked Answered
T

1

5

I'm quite new to libtool stuff. I have a problem that building my project requires libtool 1.5, but the default libtool on my system (debian, squeeze) is 2.2. What I did is I've installed libtool 1.5 from source, and put it into /usr/local. My PATH variable picks /usr/local/bin path first.

When running autogen, I can see that it "sees" libtool 1.5. However, when I run configure script, a libtool script of version 2.2 appears in my build directory. I have no idea where it comes from since I uninstalled libtool 2.2 using a package manager.

Can you please suggest how to solve the problem? How is the libtool script generated in my build folder? What is the relation to ltmain.sh?

Thanks, Vyacheslav

Tillford answered 15/11, 2011 at 10:47 Comment(1)
Your first problem is a requirement to use 1.5! Seriously, you would be much better off figuring out why modern libtool doesn't work and fixing that issue.Critique
C
8

A simple solution may be:

$ ./configure LIBTOOL=/usr/local/bin/libtool ...

but if you are using an ancient libtool, you may be using ancient autoconf as well, in which case you will have to do:

$ LIBTOOL=/usr/local/bin/libtool ./configure ...

or, if you are using csh or a variant thereof:

$ env LIBTOOL=/usr/local/bin/libtool ./configure ...

The libtool in your build directory is generated from ltmain.sh. The file config.status (generated by configure) runs a sed script that uses ltmain.sh as the input to generate libtool. ltmain.sh is copied by libtoolize into the source directory when you run libtoolize via autoreconf. If autoreconf is indeed seeing the libtool 1.5 in /usr/local/bin, then the ltmain.sh in the source directory should be a copy of /usr/local/share/libtool/ltmain.sh.

Critique answered 15/11, 2011 at 12:54 Comment(3)
btw, I managed to fix the problem in another way: running "autoreconf --force --install --symlink"Tillford
@William Pursell Is ltmain.sh generated?Trump
@ElenaLarina ltmain.sh is created when you run autoreconf (if configure.ac initializes libtool).Critique

© 2022 - 2024 — McMap. All rights reserved.