Previous Section Next Section

confLIBSEARCH

Automatic library search Build macro

The Build script automatically searches for critical (to sendmail) libraries and, if it finds any, automatically enables specific compile-time options. The list of libraries searched is in the internal confLIBSEARCH macro, which defaults to the following list:

db bind resolv 44bsd

The logic is: if a libdb.a or a libdb.so library is found in any of the directories listed with the confLIBSEARCHPATH macro (confLIBSEARCHPATH), -DNEWDB is automatically[17] defined for confENVDEF (confENVDEF and conf_prog_ENVDEF).

[17] This is why defining -DNEWDB with confENVDEF sometimes causes two -DNEWDBs to appear when compiling.

Then the library that is found first (libbind.a, libbind.so, libresolv.a, or libresolv.so) is added to the list of libraries in the confLIBS macro (confLIBS and conf_prog_LIBS). If lib44bsd is found, and if libresolv was the first found, 44bsd is also added to the confLIBS macro.

In the rare instance that this automatic search misconfigures for your site or particular build, you can carefully[18] redefine confLIBSEARCH. For example, suppose db has been installed at your site, but it is broken and you don't have the time to fix it. You might do this:

[18] Look in devtools/README and in devtools/M4/header.m4 to see how it has been predefined, before redefining it.

dnl ********** Note, removed db until we fix it, bob **********
define(`confLIBSEARCH', `bind resolv 44bsd')

Note that you must use the dnl (delete to newline) directive to form a comment in m4(1).

    Previous Section Next Section