How is libtool custom script generated by configure?

I am new to working with libtool. I have a problem that my project requires libtool 1.5, but the default libtool on my system (debian, squeeze) is 2.2. I did that I installed libtool 1.5 from the source code and put it in / usr / local. My PATH variable first selects the path / usr / local / bin.

When autogen starts, I see that it "sees" libtool 1.5. However, when I run the configure script, a libtool script version 2.2 appears in my build directory. I do not know where this comes from, since I uninstalled libtool 2.2 using the package manager.

Could you suggest how to solve the problem? How is libtool script created in my build folder? What is the relationship with ltmain.sh?

Thanks, Vyacheslav

+4
source share
1 answer

A simple solution could be:

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

but if you use the ancient libtool, you can also use the ancient autoconf, in which case you will have to do:

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

or, if you are using csh or its variant:

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

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

+7
source

Source: https://habr.com/ru/post/1381276/


All Articles