automake: Standard Configuration Variables
1
1 2.2.4 Standard Configuration Variables
1 --------------------------------------
1
1 The GNU Coding Standards also define a set of standard configuration
1 variables used during the build. Here are some:
1
1 ‘CC’
1 C compiler command
1 ‘CFLAGS’
1 C compiler flags
1 ‘CXX’
1 C++ compiler command
1 ‘CXXFLAGS’
1 C++ compiler flags
1 ‘LDFLAGS’
1 linker flags
1 ‘CPPFLAGS’
1 C/C++ preprocessor flags
1 ...
1
1 ‘configure’ usually does a good job at setting appropriate values for
1 these variables, but there are cases where you may want to override
1 them. For instance you may have several versions of a compiler
1 installed and would like to use another one, you may have header files
1 installed outside the default search path of the compiler, or even
1 libraries out of the way of the linker.
1
1 Here is how one would call ‘configure’ to force it to use ‘gcc-3’ as
1 C compiler, use header files from ‘~/usr/include’ when compiling, and
1 libraries from ‘~/usr/lib’ when linking.
1
1 ~/amhello-1.0 % ./configure --prefix ~/usr CC=gcc-3 \
1 CPPFLAGS=-I$HOME/usr/include LDFLAGS=-L$HOME/usr/lib
1
1 Again, a full list of these variables appears in the output of
1 ‘./configure --help’.
1