Translations:Autotools/12/en

From Alliance Doc
Jump to navigation Jump to search

Options defined by variables

You can generally specify the compiler that is used and the options that should be passed to it by declaring variables after the ./configure command. For example, to define the C compiler and the options to give it, you could run

Question.png
[name@server ~]$ ./configure CC=icc CFLAGS="-O3 -xHost"

The most commonly used variables include

Option Description
CFLAGS Options to pass to the C compiler
CPPFLAGS Options to pass to the preprocessor and to C, C++, Objective C, and Objective C++ compilers
CXXFLAGS Options to pass to the C++ compiler
DEFS Allows the definition of a preprocessor macro
FCFLAGS Options to pass to the Fortran compiler
FFLAGS Options to pass to the Fortran 77 compiler
LDFLAGS Options to pass to the linker
LIBS Libraries to link

A more exhaustive list of variables and typical options is available in the autoconf documentation.