Compiler Options


Compiler Options

Compiler options are set in the CCARGS variable. C source code files require header files that define certain functions and variables. The standard location for header files is the /usr/include directory. If your header files are located somewhere else, you have to tell the compiler where to look for them. The -I compiler option is used to spec- ify additional directories where the compiler might find header files. If you are link- ing with libraries from external packages, the header files might be located where the package is installed rather than in the standard location. A common convention for external packages is to install header files in /usr/local/include. If you want to tell the compiler to look in that directory as well as the standard location when building Postfix, specify the options and directory with CCARGS :

CCARGS='-I/usr/local/include/'

Use additional -I options for each additional directory the compiler should search.

Postfix uses conditional compilation during its build, depending on which libraries or other resources are available on your system. It defines certain macros based on what it discovers about your system or based on options you have selected. The -D option provides a way to define macros at the time you compile Postfix. Add-on packages for Postfix require that you define a particular macro to tell Postfix to include it when building. For example, if you want to include support for MySQL, you define the HAS_MYSQL macro:

CCARGS='-DHAS_MYSQL'

results matching ""

    No results matching ""