The Motif libraries shipped with LynxOS x86 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.
You must create symbolic links for the Motif libraries and 
utilities in the /usr/X11R6 directory tree.
      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
  
The Motif imake-configuration files are part of the LynxOS X Window
package. They must be copied to the /usr/X11R6 directory tree.
      cp /usr/lib/X11/config/Motif.* /usr/X11R6/lib/X11/config
  
The XFree86 libraries are compiled with the -mposix compiler option
while the Motif libraries shipped with LynxOS x86 2.3.0 are not. This
incompatibility will cause Motif XmFileSelection widgets to be linked 
with the wrong (i.e. POSIX) directory routines. To circumvent this 
problem apply the following patch to the library:
      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
  
This patch is not necessary for LynxOS revisions after 2.3.0.
Edit /usr/X11R6/lib/X11/config/lynx.cf and change the definition
of HasMotif
from
       #define HasMotif    NO
  
to
       #define HasMotif    YES
  
The file Motif.tmpl shipped with LynxOS Motif must be modified
to work with XFree86. In every reference to UnsharedLibReferences
the first argument must be changed
from
       UnsharedLibReferences(<Something>LIB, Arg2, Arg3)
  
to
       UnsharedLibReferences(<Something>, Arg2, Arg3)
  
/usr/X11R6/lib/X11/config.