Sample describing autotools usage.
-
Create and write
configure.acin root directory and aMakefile.amin root directory and each subdirectory containing source code. -
Run
autoreconf --installto perform configuration files and Makefile/Makefile.in generation
(autoreconfruns autotools toolchain in right order:aclocal,autoconf,autoheader,automake). -
Use
./configure && make && sudo make installto install package. -
Use
./configure --prefix=/usrto change installation path. -
Use
make CC=<pathToCompiler> CFLAGS="<compilerFlags>"to change compiler and compiler options (default togccand-g -O2respectively).
- Official documentation.
- Slides describing autotools workflow.