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:[44]

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[45] is used with the mail.local program.

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 on page 129) for any program that will look up password, group, or similar information.

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

[44] * Note that, once excluded, support cannot easily be included later by using options. ...

Get sendmail, 4th Edition 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.