Autotools automake: Makefile.am and configure.ac to Makefile.in aclocal: aclocal.m4 for configure.ac autoscan: configure.scan as draft for configure.ac autoconf: configure from configure.ac, *.m4 autopoint (gettextize): Copy gettext infrastructure libtoolize: Copy libtool infrastructure. libtool: Compiles and links. Using autotools Simplifies standard actions Complicates non-standard actions Makefile.am -> Expand targets -> Makefile.in Makefile.in -> preprocess @SYMBOL@ -> Makefile make dist make distcheck make distclean make maintainer-clean --enable-maintainer-mode Important Makefile.am assignments Build in specified directories: SUBDIRS = a b c target_WHAT = value[s] target: Name of the target binary or library: binary: name with - replaced with _ FIXME library: base name with ... Directory: directory: symbolic name Predefined names: bin sbin lib libexec ... (defaults to predefined GNU Coding standards directories) WHAT: SOURCES: Source files for binary or library. CPPFLAGS: Flags for preprocessor. CFLAGS, CXXFLAGS: Flags for compilers. LDFLAGS: Flags for linker (not libraries!) LDADD: Additional libraries for linker. PROGRAMS: programs to be installed as executables SOURCES: sources for a library or binary LIBRARIES: static libraries (value = name of the library should end by .a) LTLIBRARIES: any libraries for libtool (value = name of the library should end by .la) HEADERS: include files Flags for aclocal: ACLOCAL_AMFLAGS = -I m4 Additional files packages by make dist: EXTRA_DIST = foo la files Magic with variables, rpath (only directly linked libraries!), rpath-link, cross linking of libraries. Using checks Creating binary Creating library Reusing source with different flags Linking against uninstalled libraries -no-undefined Modules version info x module Writing checks AC_CACHE_VAL AC_CACHE_CHECK