<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Rebuilding the XFree86 Distribution</TITLE>
</HEAD>
<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">

<A HREF="NetBSD.html"><EM>README for XFree86 on NetBSD</EM></A>
 <b>:</b> <EM>Rebuilding the XFree86 Distribution</EM><BR>
<b>Previous:</b> <A HREF="NetBSD8.html"><EM>Kernel Support for X</EM></A><BR>
<b>Next:</b> <A HREF="NetBSD10.html"><EM>Building New X Clients</EM></A>


<HR NOSHADE>
  <H2><A NAME="16"></A>9. Rebuilding the XFree86 Distribution</H2>
<p>The server link kit allow you to rebuild just the X server with a
minimum amount of disk space.  Just unpack it, make the appropriate
changes to the <code>xf86site.def</code>, type ``<code>./mkmf</code>'' and
``<code>make</code>'' to link the server.  See <code>/usr/X11R6/lib/Server/README</code>
for more info.</p>
<p>See <A href="INSTALL.html">INSTALL</A> for instructions on
unbundling and building the source distribution.</p>
<p>You should configure the distribution by editing
<code>xc/config/cf/host.def</code>  before compiling.  To compile the
sources, invoke ``<code>make World</code>'' in the xc directory.</p>

<H3><A NAME="17"></A>9.1. Console drivers<A NAME="console-drivers"></A></H3>
<p>XFree86 has a configuration option to select the console
drivers to use in <code>xf86site.def</code>:
<ul>
<li> if you're using pccons put:
<blockquote><code>
<pre>
 #define XFree86ConsoleDefines -DPCCONS_SUPPORT
</pre>
</code></blockquote>
</li>
<li>if you're using pcvt put:
<blockquote><code>
<pre>
 #define XFree86ConsoleDefines -DPCVT_SUPPORT
</pre>
</code></blockquote>
</li>
<li>if you're using syscons put:
<blockquote><code>
<pre>
 #define XFree86ConsoleDefines -DSYSCONS_SUPPORT
</pre>
</code></blockquote>
</li>
<li>if you're running codrv put:
<blockquote><code>
<pre>
 #define XFree86ConsoleDefines -DCODRV_SUPPORT
</pre>
</code></blockquote>
</li>
</ul>

If you don't define <b>XFree86ConsoleDefines</b> in <code>xf86site.def</code> the
pccons and pcvt drivers will be supported by default.</p>

<p>Syscons and codrv are not bundled with NetBSD. They are
available by anonymous FTP from a number of sites. They are not
supported by the XFree86 binary distribution anymore. </p>

<H3><A NAME="18"></A>9.2. pcvt_ioctl.h file:</H3>
<p>XFree86's default configuration includes support for the PCVT console
driver. Unfortunately, NetBSD versions before 19980413 don't install
the <code>pcvt_ioctl.h</code> 
file in <code>/usr/include/machine</code>. If you want to build XFree86
with PCVT support, execute the following command as root before
starting <code>make World</code>:
<blockquote><code>
<pre>
cp /usr/src/sys/arch/i386/isa/pcvt/pcvt_ioctl.h /usr/include/machine
</pre>
</code></blockquote>
</p>
<p>If you don't have kernel sources, you can grab this file from
ftp.netbsd.org or one of its mirrors. If you're not running PCVT, you
can remove -DPCVT_SUPPORT from <b>XFree86ConsoleDefines</b> in
<code>xf86site.def</code> too.</p>


<H3><A NAME="19"></A>9.3. console.h and ioctl_pc.h files:</H3>
<p>If you want to build a server supporting codrv and you
don't already have the corresponding header file 
<code>ioctl_pc.h</code> installed in <code>/usr/include/machine</code>, then
install the copy that is supplied in
<code>xc/programs/Xserver/hw/xfree86/etc</code>.  If you run
NetBSD-current you probably want to install it in
<code>/usr/src/sys/arch/i386/include</code> too, so that it get
reinstalled each time you run <code>make includes</code>.</p>
<p>If you have installed the  codrv console driver, this
file should be taken from your installed version of the driver.</p>
<p>The <code>console.h</code> file for syscons isn't distributed with XFree86
anymore. You should get it from the syscons distribution.</p>

<H3><A NAME="20"></A>9.4. Support for shared libs under NetBSD 1.0 and later</H3>
<p>By default XFree86 builds for NetBSD with shared libraries 
support. If you're building on 0.9 or don't want shared libraries 
add the following line to <code>host.def</code>:</p>
<p>
<blockquote><code>
	
#define BuildBsdSharedLibs 	NO
</code></blockquote>
</p>

<H3><A NAME="21"></A>9.5. Building on other architectures<A NAME="sparc"></A></H3>
<p>XFree86 also compiles on NetBSD/sparc. The Sun server
patches from Dennis Ferguson and Matthew Green have been integrated in
<code>xc/programs/Xserver/hw/sun</code>.  Small
modifications to <code>xf86site.def</code> are needed:
<ul>
<li>Set all variables defining the servers to build to
<b>NO</b>. (The variables controlling the Sun servers to build
<b>Xsun24Server</b>, <b>XsunServer</b> and <b>XsunMonoServer</b> are
defined at the end of <code>NetBSD.cf</code>.)</li>
<li>Set <b>ServerToInstall</b> to the sun server of your
choice. (Xsun or XsunMono).</li>
<li>Look at other applicable options in the <A href="INSTALL.html">INSTALL document</A>.</li>
</ul>
</p>
<p>Problems with this port should be reported to the
<em>port-sparc@NetBSD.Org</em> mailing list or directly to me
<em>matthieu@laas.fr</em> rather than to the xfree86 mailing list. </p>

<p> 
Note that the NetBSD project has now its own source tree, based on the
XFree86 source tree, with some local modifications. You may want to
start with this tree to rebuild from sources. 
The NetBSD xsrc source tree is available at: 
<A href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-current/xsrc/">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-current/xsrc/</A></p>

 <HR NOSHADE>
<A HREF="NetBSD.html"><EM>README for XFree86 on NetBSD</EM></A>
 <b>:</b> <EM>Rebuilding the XFree86 Distribution</EM><BR>
<b>Previous:</b> <A HREF="NetBSD8.html"><EM>Kernel Support for X</EM></A><BR>
<b>Next:</b> <A HREF="NetBSD10.html"><EM>Building New X Clients</EM></A>



</BODY>
</HTML>
