-- $XFree86: xc/programs/xterm/README.os390,v 1.2 1999/11/19 13:55:13 hohndel Exp $

Below are install instructions for os/390 2.5 & below and
for os/390 2.6 & above.  The basic reasons for exporting
the LIBS and CFLAGS variables is to get the configure
script to run properly under os/390.  configure, when
checking for X, attempts to compile a program something like

   int main() {
   XtMalloc()
   ; return 0; }

using 'cc -o conftest conftest.c -lXt'.  However this results
in a number of linkedit messages such as:

   IEW2456E 9207 SYMBOL xcatd UNRESOLVED.  MEMBER COULD NOT BE INCLUDED FROM THE
            DESIGNATED CALL LIBRARY. NAME SPACE = 3
   IEW2456E 9207 SYMBOL XrmQGetResource UNRESOLVED.  MEMBER COULD NOT BE INCLUDED
            FROM THE DESIGNATED CALL LIBRARY.
   IEW2456E 9207 SYMBOL XrmGetDatabase UNRESOLVED.  MEMBER COULD NOT BE INCLUDED
            FROM THE DESIGNATED CALL LIBRARY.

The only way I can get this program to compile and link is to
use 'cc -o conftest conftest.c -lXt -lX11 -lSM -lICE'.
With os/390 2.6 and above, IBM has provided X functions in dlls;
this is the reason for the separate install steps.  In fact,
trying to use the X archive files (eg -lX11) when linking xterm
results in an abend0C1 in low storage when X tries to call the
initialize function (at least on my system).  This has something
to do with the calling X routine thinking it has a function pointer
descriptor (c++) when it actually has just a function pointer (c).
Unfortunately, I have been unable to recreate the problem in a
simple testcase, so I haven't reported it to IBM.  Anyway, for os/390
2.6 and above, configure will build a Makefile with the following line:

   LIBS  = -lXaw -lXext -lXmu -lXt  -lSM -lICE -lX11 /usr/lib/Xaw.x /usr/lib/SM.x /usr/lib/ICE.x /usr/lib/X11.x -lcurses

The '-lXaw -lXext -lXmu -lXt  -lSM -lICE -lX11' should be manually removed;
this isn't strictly necessary, but will reduce the size of the executable
by about 4M.

Good Luck!!
Greg Smith
rys@trex.rtpnc.epa.gov



Install instructions for os/390 2.5 and *below*:
------------------------------------------------
   gunzip xterm.tar.gz
   pax -o from=ISO8859-1,to=IBM-1047 -rf xterm.tar
   cd xterm
   export LIBS='-lXt  -lX11 -lSM -lICE'
   export CFLAGS='-D_ALL_SOURCE'
   ./configure
   make
   export DISPLAY=my.xserver.name:0
   ./xterm


Install instructions for os/390 2.6 and *above*:
------------------------------------------------
   gunzip xterm.tar.gz
   pax -o from=ISO8859-1,to=IBM-1047 -rf xterm.tar
   cd xterm
   export LIBS='/usr/lib/Xaw.x /usr/lib/SM.x /usr/lib/ICE.x /usr/lib/X11.x'
   export CFLAGS='-O2 -W c,dll -D_ALL_SOURCE'
   ./configure
   [optional: edit the Makefile and remove '-lXaw -lXext -lXmu -lXt  -lSM -lICE -lX11'
              from the LIBS assignment]
   make
   export DISPLAY=my.xserver.name:0
   ./xterm
