home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Previous Section Next Section

confENVDEF and conf_prog_ENVDEF

Pass -D switches during compilation Build macro

The conf_prog_ENVDEF macros are used to assign values to the ENVDEF= Makefile directive in the Makefiles for the various programs in the source tree. The ENVDEF= directive is primarily used to specify code that should be specially included or excluded when compiling. The following example shows support for identd(8) being excluded from the compiled binary of sendmail:[15]

[15] Note that, once excluded, support cannot easily be included later by using options. It might be better to turn some facilities, such as identd(8), off and on with options rather than compiling them out. See this section for a description of the Timeout.ident option.

APPENDDEF(`conf_sendmail_ENVDEF', `-DIDENTPROTO=0')

Note that conf_prog_ENVDEF is often given values in the devtools/OS file for your architecture. To avoid clobbering those values, use APPENDDEF to define conf_prog_ENVDEF.

To use the conf_prog_ENVDEF macro, simply replace the "prog" with the name of any of the programs or library directories in the sendmail source tree. For example, conf_vacation_ENVDEF is used with the vacation program, and conf_mail_local_ENVDEF[16] is used with the mail.local program.

[16] The Build script magically changes the dot into an underscore to keep m4 from complaining.

When a single macro is needed to affect all programs, you can use the confENVDEF macro:

APPENDDEF(`confENVDEF', `-DNISPLUS=1')

Here we enable use of Sun's NIS+ services (NISPLUS) for any program that will look up password, group, or similar information.

In Table 3-7, the third column indicates if it is appropriate to redefine a particular macro in your Makefile. Where appropriate, most will be defined with a confENVDEF macro.

    Previous Section Next Section