I have a sub-package setup in my autotools repository, in which several related projects are glued together using a master configure.ac and Makefile.am.
Aside from the compilation ordering, easily done via AC_CONFIG_SUBDIRS() macro, there is the need to export headers and library locations required between these excessively coupled sub-projects.
--- configure.ac
|- Makefile.am
|- subproj1 --- configure.ac
| |- Makefile.am
| |- src
| \- include
[...]
|
\- subprojN --- configure.ac // requires -I${top_srcdir}/subprojX/include and
|- Makefile.am // -L${top_srcdir}/subprojX/src
|- src
\- include
Regrouping these packages as one is not an option, unfortunately. I tried exporting variables using AC_SUBST() and/or make's export command, for no avail.
The only way I could get these flags available into every sub-project Makefile was passing CPPFLAGS and LDFLAGS into the root configure invocation (via command-line). However, I'd hope if there is a way to keep these values inside autotools stuff, instead of having to create a separate script for them.
PS: similar to automake and project dependencies