How to handle subprojects with autotools?

I have some C++ project build by autotools.

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.

  • Cause of change from `-arch ppc` to `-arch ppc7400`?
  • Using git for distribution with autotools
  • Bumping version numbers for new releases in associated files (documentation)
  • Which files generated by Autotools should I keep in version control repository?
  • Looking for a way to store versions in a binary compiled from git repo
  • Compiling workflow with version control
  • Say, I have:

    src/<my src files>
    modules/libfoo/
            libbar/
    Makefile.am
    Configure.in
    <other autotools junk>
    

    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.

  • How git deals with folder names with spaces
  • Why should I use gitignore?
  • Using Git, what's the best way to subtree merge an external project that has submodules?
  • How do I recover/resynchronise after someone pushes a rebase or a reset to a published branch?
  • How to setup distributed version control in a company
  • What do edge colors mean in gitk?
  • One Solution collect form web for “How to handle subprojects with autotools?”

    You can run the configure scripts in the sub-modules by adding the AC_CONFIG_SUBDIRS command to the top-level configure script. It tells the top-level script to descend into the sub directories and invoke the configure script found there. Then, you can just reference the built libraries from your Makefile.am.

    Read this section of the GNU automake manual.

    Git Baby is a git and github fan, let's start git clone.