views:

21

answers:

1

I am developing a new project, using Autotools for my build infrastructure. I would like to subsume external dependencies into my source tree. These dependencies are using Autotools, as well. How can I configure my project's build scripts to build and link against subsumed dependencies? Though Duret-Lutz's tutorial is excellent, this situation is only briefly addressed in a few slides. I found his explanation deeply confusing.

By adding the directory name of subsumed dependencies to the toplevel Makefile.am's SUBDIRS the dependency is being configured and built. It is possible to manually set include paths through CFLAGS, but how do I link against libtool .la files?

+1  A: 

You can add the libs with relative paths.

SUBDIRS = extern
foo_SOURCES = foo/x.c ...
foo_LDADD = extern/bar/libbaz.la
foo_DEPENDENCIES = extern/bar/libbaz.la # Hack to prevent atomake from screwing parallel builds
Rudi
Perfect, thank you. Funny how hard it is to look something up in the GNU manuals if you do not know the name of the thing you are researching.
troutwine