简体   繁体   中英

Autotools - set path to library

In my debian system there is an installed library. I wan't to make a patch to the library and to the application, that uses it. So, I downloaded sources of library's and application's packages. Then I patched a library and built it (without installing it to the system).

Now, when I ./configure the application, autotools detect the system's version of the library, not the mine one. So, I did ./configure CFLAGS=-I/home/aquirel/dev/vte-0.28.2/src LDFLAGS=-L/home/aquirel/dev/vte-0.28.2/src/.libs

Is there any more intelligent way to do it? Because, using this approach generates libtool temporary wrapper script instead of a executable binary.

And also, I don't want to install a patched version of a library to the system till I have tested it in the application.

You could install the vte package using the DESTDIR install:

$ cd /home/aquirel/dev/vte-0.28.2
$ make DESTDIR=/home/aquirel/dev/test-vte install

This will install all the headers/libraries to /home/aquirel/dev/test-vte as if it were / . You'll have to set up paths to configure a little differently:

$ ./configure CFLAGS=-I/home/aquirel/dev/test-vte/usr/local/include LDFLAGS=-L/home/aquirel/dev/test-vte/usr/local/lib

and setup LD_LIBRARY_PATH for the vte shared libraries as well for your application test environment.

Because, using this approach generates libtool temporary wrapper script instead of a executable binary.

libtool always creates a wrapper script for applications that link shared libraries. If you need to run your application under Valgrind or gdb, see here for more information about libtool 's --mode=execute option.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM