<!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>Using XFree86 with Motif</TITLE>
</HEAD>
<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">

<A HREF="LynxOS.html"><EM>README for XFree86 on LynxOS</EM></A>
 <b>:</b> <EM>Using XFree86 with Motif</EM><BR>
<b>Previous:</b> <A HREF="LynxOS4.html"><EM>Installing XFree86 manual pages</EM></A><BR>
<b>Next:</b> <A HREF="LynxOS6.html"><EM>Compiling the XFree86 Distribution</EM></A>


<HR NOSHADE>
  <H2><A NAME="15"></A>5. Using XFree86 with Motif</H2>

<p>The Motif libraries shipped with LynxOS AT 2.3.0 and 2.4.0 can be
used with the XFree86 libraries. Follow the steps outlined below after
you have installed XFree86 and LynxOS Motif on your system.</p>

<H3><A NAME="16"></A>5.1. Copy Motif files</H3>

<p>You must create symbolic links for the Motif libraries and 
utilities in the <code>/usr/X11R6</code> directory tree.
<blockquote><code>
<pre>
      ln -s /usr/bin/X11/uil /usr/X11R6/bin
      ln -s /usr/lib/libUil.a /usr/X11R6/lib
      ln -s /usr/lib/libMrm.a /usr/X11R6/lib
      ln -s /usr/lib/libXm.a /usr/X11R6/lib
      ln -s /usr/lib/X11/uid /usr/X11R6/lib/X11
      ln -s /usr/include/Xm /usr/X11R6/include
      ln -s /usr/include/Mrm /usr/X11R6/include
      ln -s /usr/include/uil /usr/X11R6/include
  
</pre>
</code></blockquote>
</p>
<p>The Motif imake-configuration files are part of the LynxOS X Window
package. They must be copied to the <code>/usr/X11R6</code> directory tree.
<blockquote><code>
<pre>
      cp /usr/lib/X11/config/Motif.* /usr/X11R6/lib/X11/config
  
</pre>
</code></blockquote>
</p>

<H3><A NAME="17"></A>5.2. Motif library patch for LynxOS AT 2.3.0</H3>

<p>The XFree86 libraries are compiled with the -mposix compiler option
while the Motif libraries shipped with LynxOS AT 2.3.0 are not. This
incompatibility will cause Motif <code>XmFileSelection</code> widgets to be linked 
with the wrong (i.e. POSIX) directory routines. To circumvent this 
problem apply the following patch to the library:
<blockquote><code>
<pre>
      cp /usr/lib/libXm.a /usr/X11R6/lib
      ar x /usr/X11R6/lib/libXm.a Xmos.o
      ar x /lib/libc.a directory.s.o
      ld -r -o x.o Xmos.o directory.s.o
      mv x.o Xmos.o
      ar r /usr/X11R6/lib/libXm.a Xmos.o
  
</pre>
</code></blockquote>
</p>
<p>This patch is not necessary for LynxOS revisions after 2.3.0.</p>

<H3><A NAME="18"></A>5.3. X11R6 config file patch</H3>

<p>Edit <code>/usr/X11R6/lib/X11/config/lynx.cf</code> and change the definition
of <code>HasMotif</code>
<blockquote><code>
from
<pre>
       #define HasMotif    NO
  
</pre>

to
<pre>
       #define HasMotif    YES
  
</pre>
</code></blockquote>
</p>

<H3><A NAME="19"></A>5.4. Motif config file patch</H3>

<p>The file <code>Motif.tmpl</code> shipped with LynxOS Motif must be modified
to work with XFree86. In every reference to <code>UnsharedLibReferences</code>
the first argument must be changed
<blockquote><code>
from
<pre>
       UnsharedLibReferences(&lt;Something&gt;LIB, Arg2, Arg3)
  
</pre>

to
<pre>
       UnsharedLibReferences(&lt;Something&gt;, Arg2, Arg3)
  
</pre>
</code></blockquote>

Be sure to apply the change to the file copied to
<code>/usr/X11R6/lib/X11/config</code>.</p>

 <HR NOSHADE>
<A HREF="LynxOS.html"><EM>README for XFree86 on LynxOS</EM></A>
 <b>:</b> <EM>Using XFree86 with Motif</EM><BR>
<b>Previous:</b> <A HREF="LynxOS4.html"><EM>Installing XFree86 manual pages</EM></A><BR>
<b>Next:</b> <A HREF="LynxOS6.html"><EM>Compiling the XFree86 Distribution</EM></A>



</BODY>
</HTML>
