README for XFree86® 4.6.0 on NetBSD : Building New X Clients
Previous: Rebuilding the XFree86 Distribution
Next: Thanks

9. Building New X Clients

The easiest way to build a new client (X application) is to use xmkmf if an Imakefile is included in the sources. Type ``xmkmf -a'' to create the Makefiles, check the configuration if necessary and type ``make''. Whenever you install additional man pages you should update whatis.db by running ``makewhatis /usr/X11R6/man''.

When porting clients to *BSD systems, make use of the symbol BSD for code which is truly BSD-specific. The value of the symbol can be used to distinguish different BSD releases. For example, code specific to the Net-2 and later releases can use:

#if (BSD >= 199103)

To ensure that this symbol is correctly defined, include <sys/param.h> in the source that requires it. Note that the symbol CSRG_BASED is defined for *BSD systems in XFree86 3.1.1 and later. This should be used to protect the inclusion of <sys/param.h>.

For code that really is specific to a particular i386 BSD port, use __FreeBSD__ for FreeBSD, __NetBSD__ for NetBSD, __OpenBSD__ for OpenBSD, and __bsdi__ for BSD/386.


README for XFree86® 4.6.0 on NetBSD : Building New X Clients
Previous: Rebuilding the XFree86 Distribution
Next: Thanks