I have a directory structure with source code cpp- and header-files in many subdirectories at many different levels. Each directory has its own CMakeLists.txt specifying how the library target in that directory is to be built and, at the same time, define any public properties of that target, for example the header-files in that directory. In the root directory is the main CMakeLists.txt file which specifies how the executable of the project is to be built and it defines dependencies to the targets it depends on. This "modern CMake" setup is nice, clean and straightforward and it works like a charm. For example, header files residing deep down in the directory hierarchy is easily found using the defined dependencies.
However, now I need to support an old platform which uses autotools via buildtool (which builds this system application and bundle it with a custom built linux image). Therefore I'd like to sort of replicate this CMake setup, that utilizes Makefile.am and configure.ac, that I have to supply instead of the CMake files. I have to keep the directory structure of the source code, and it would be really nice if the autotools build files could follow the same directory as the CMakeLists.txt files does.
The problem is that I do not know autotools good enough and despite having read/googled docs and various articles I still have no idea how I should set this up for autotools. No school book examples that I've found present this kind of project setup that I just described. Maybe the setup isn't feasible using autotools? But is it possible? And if so, how?
So, I tried to create Makefile.am and configure.ac files in this directory structure but one of several problems are that header files cannot be found and don't know how to workaround these problems.