8 Building Other X Clients

Contents of this section

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

On FreeBSD 1.0 and earlier systems, to avoid the ``Virtual memory exhausted'' message from cc while compiling, increase the data and stack size limits (in csh type ``limit datasize 32M'' and ``limit stacksize 16M''). This is not needed on FreeBSD 2.0 and later since the defaults are ample.

Note: Starting with XFree86 2.1 and FreeBSD 1.1, the symbol __386BSD__ no longer gets defined either by the compiler or via the X config files for FreeBSD systems. 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, __386BSD__ for 386BSD, and __bsdi__ for BSD/386.

Next Chapter, Previous Chapter

Table of contents of this chapter, General table of contents

Top of the document, Beginning of this Chapter