Полезная информация


sendmailSearch this book
Previous: C.2 Get the SourceAppendix C
The Berkeley DB Database
Next: D. Sun Enhancements

C.3 Compile and Install

To compile, merely run make(1). If you are compiling just for use in sendmail, you can leave the resulting libdb.a in with the source and reference it there (see INCDIRS= in Section 18.4.3, "INCDIRS=" for an example of how to do this). If you are compiling for general system use, you should test the result before installing. Testing is available in ../../test.

Installation is simple, although it must be done by hand. There is no install entry in the Makefile. Where you install it is up to you. Under /usr is one possibility. Under /usr/local is another. At Berkeley it was installed under /usr/sww. The following example shows how to install it in /usr/local on a BSD UNIX system:

% cp libdb.a /usr/local/lib
% ranlib /usr/local/lib/libdb.a
% mkdir /usr/local/include/db /usr/local/include/db/sys
% cp include/* /usr/local/include/db
% ln -s /usr/local/include/db/cdefs.h /usr/local/include/db/sys
% cp ../../man/*.3 /usr/local/man/man3

Finally, to use this new library, you need to return to the sendmail source and edit your Makefile there. You'll need to change two lines to reflect the actual location where you installed db:


For our installation in /usr/local the correct declarations would look like this:


Previous: C.2 Get the SourcesendmailNext: D. Sun Enhancements
C.2 Get the SourceBook IndexD. Sun Enhancements