-- $XFree86: xc/programs/xterm/README.os390,v 1.3 2000/09/22 10:42:05 alanh 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.

The '-Wl,EDIT=NO' causes the Binder to produce a non-editable executable,
dramatically reducing the size of the executable file.

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 -Wl,EDIT=NO'
   ./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
   ./configure   # LIBS, CFLAGS, and CC are defined by configure for os/390 2.6.
   [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
