Configuring Compiler Options

The original GNU make build system provided a number of command-line build options. By specifying a list of auxiliary targets on the make command line, the user could indicate that he wanted a debug or release build, force a 32-bit build on a 64-bit system, generate generic SPARC code on a Solaris system, and so on—a turnkey approach to build systems that is quite common in commercial code.

In open source projects, and particularly in Autotools-based build systems, the more common practice is to omit much of this rigid framework, allowing the user to set his own options in the standard user variables, CC, CPP, CXX, CFLAGS, CXXFLAGS, CPPFLAGS, and so on.[131]

Probably the most compelling argument for the Autotools approach ...

Get Autotools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.