title: How to handle subprojects with autotools?
body: <p>I have some C++ project build by autotools. </p>
  
  <p>The project uses some libraries, also written by me. Source of libraries are imported to the project as submodules of git. Each library has its own autotools files.</p>
  
  <p>Say, I have:</p>
  
  <pre><code>src/&lt;my src files&gt;
  modules/libfoo/
          libbar/
  Makefile.am
  Configure.in
  &lt;other autotools junk&gt;
  </code></pre>
  
  <p>What I want is to somehow include libraries into main project compilation chain. I guess that just including subdir to Makefile.am is not enough, because some checks can be reformed in configure.am.</p>