Building X11-based Applications and Libraries
If you cannot find binaries for X11-based applications (or if you prefer to build the applications yourself), most of the tools to do this are available. First, you need Apple’s Developer Tools. If you installed XFree86 by hand, make sure you installed XProg.tgz , which contains development tools and header files needed for building X11-based applications. The XDarwin distribution includes these tools and header files.
The process of building software usually begins with generating one or more makefiles customized to your system. For X11 applications, there are two popular methods for generating makefiles. One method is to use a configure script (see Section 4.2 in Chapter 4.)
The other popular method for generating makefiles involves using the xmkmf script, which is a frontend to the imake utility. xmkmf invokes imake, which creates a makefile. To do this, imake looks for a template file called Imakefile.
With imake-driven source releases, after downloading a source tarball, unpacking it, and changing to the top-level source directory, you’ll find an Imakefile. After reading the README or INSTALL files, examine the Imakefile to see if you need to change anything. Then the next step is usually to issue the command:
% xmkmf -aWhen invoked with the -a option, xmkmf reads imake-related files in /usr/X11R6/lib/X11/config and performs the following tasks recursively, beginning in the top-level directory and then in the subdirectories, if ...