x3270 Build and Install Instructions

Vanilla X11R5 or X11R6

x3270 was developed on a Sun workstation running SunOS 4.1.3_U1 and
MIT X11R5. It is set up to build and install without modifications under any
complete X11R5 or X11R6 implementation. 

A "complete" R5 or R6 implementation means that xmkmf and imake are
configured and installed on your system, and that the Xaw and Xmu libraries
and header files are installed. Some vendors (HP and IBM in particular)
consider these optional software and do not always install them. 

If you are running vanilla X11R5 or X11R6, then the build procedure is: 

    xmkmf               # create a Makefile
    make depend         # add dependency information
    make                # build x3270 and its fonts

x3270 requires that its fonts and app-defaults file be installed in order to
run. However, a script is provided for testing a local copy of x3270 in the
current directory: 

    ./dryrun            # test x3270

Once you are satisfied that x3270 is working, you can install it (as root) with
the command: 

    make install

Before running x3270, you will also need to (once): 

    xset fp rehash

That's the easy way. Here are the exceptions: 

Vanilla X11R4

If you are running MIT X11R4 (subject to the same definition of
"completeness" above), the build procedure is almost as simple: 

    mv Imakefile.R4 Imakefile   # use the R4 Imakefile instead
    xmkmf                       # create a Makefile
    make depend                 # add dependency information
    make                        # build x3270 and its fonts

x3270 requires that its fonts and app-defaults file be installed in order to
run. However, a script is provided for testing a local copy of x3270 in the
current directory: 

    ./dryrun            # test x3270

Once you are satisfied that x3270 is working, you can install it (as root) with
the command: 

    make install

Before running x3270, you will also need to (once): 

    xset fp rehash

IBM RS/6000, AIX 3.2, X11R5

AIX X11R5 does not include does not include xmkmf or imake, but it
includes the source code for them. If these have not been built and installed
on your system (e.g., if there is no such file as "/usr/bin/X11/imake"), you
must first build and install them by following the instructions in
/usr/lpp/X11/Xamples/README. 

Once these have been installed, you can use the standard X11R5 build
procedure above. 

IBM RS/6000, AIX 3.2, X11R4

AIX X11R4 does not include the Xaw libraries by default, and it does not
include xmkmf at all. If the "Xample" clients and libraries have not been
installed on your system (e.g., if there is no such file as
"/usr/bin/X11/imake"), you must first build and install them by following
the instructions in /usr/lpp/X11/Xamples/README. 

Once these have been installed, you can use a simple variation on the R4
build procedure: 

    mv Imakefile.R4 Imakefile   # use the R4 Imakefile instead
    imake -DUseInstalled -I/usr/lpp/X11/Xamples/config  # replacement for xmkmf
    make depend                 # add dependency information
    make                        # build x3270 and its fonts

x3270 requires that its fonts and app-defaults file be installed in order to
run. However, a script is provided for testing a local copy of x3270 in the
current directory: 

    ./dryrun            # test x3270

Once you are satisfied that x3270 is working, you can install it (as root) with
the command: 

    make install

Before running x3270, you will also need to (once): 

    xset fp rehash

HP-UX A9.01, X11R5

HP's X11R5 distribution does not include the Xaw libraries or header files.
As HP's X man page says, 

 A number of unsupported core MIT clients and miscellaneous utilities
 are provided in /usr/contrib/bin. In addition, the entire core MIT
 distribution, compiled for Hewlett-Packard platforms, can be obtained
 from HP's users group INTERWORKS for a nominal fee. See the
 release notes for details. 

What you need is the Xaw and Xmu libraries, imake, and xmkmf. Then you
can follow the vanilla R5 build and install instructions. 

Sun Solaris 2.3, OpenWindows Version 3.3 or Later

Surprise! Sun has given up on the xnews server and proprietary font scheme,
and OpenWindows 3.3 is based on plain old X11R5. Follow the instructions
for Vanilla X11R5. 

However, Sun's X11 configuration files can still cause some problems.
These are not x3270 problems -- they affect building any X application that
uses an Imakefile. 

If you see compler errors like this: 

    ucbcc: Warning: Option -Wa,-cg92 passed to ld, if ld is invoked, ignored otherwise

Then you need to to edit the "Makefile" that was produced by xmkmf and
change the line that reads: 

    CCOPTIONS = -DSYSV -DSVR4 -xF -Wa,-cg92

and change it to: 

    CCOPTIONS = -DSYSV -DSVR4 -xF

If "make install" fails with the following error: 

    sh: /usr/openwin/bin/bsdinst: not found

Then edit the "Makefile" again and change the line that reads: 

    INSTALL = $(BINDIR)/bsdinst

and change it to: 

    INSTALL = /usr/ucb/install

Sun OpenWindows, Version 3.0, 3.1, or 3.2

Early versions of Sun OpenWindows use a proprietary font format that
renders standard Imakefiles useless. A special Makefile is included in the
x3270 distribution to handle this. (NOTE: The special Makefile must be run
with Sun make; Gnu make will not work). 

To build x3270: 

    make -f Makefile.openwin

If you get the following undefineds: 

   _get_wmShellWidgetClass
   _get_applicationShellWidgetClass

This is a bug in Sun's X11 libraries, and can be corrected by obtaining
patches 100512-02 and 100573-03 from Sun. As a short-term workaround,
there is a line in Makefile.openwin which you can uncomment. 

Note: When the fonts are being compiled, the "bldfamily" program will
produce output lines that look like: 

    * 3270                 ./3270.ff (Encoding: unknown)

These "unknown" messages are harmless. 

x3270 requires that its fonts and app-defaults file be installed in order to
run. However, a script is provided for testing a local copy of x3270 in the
current directory: 

    ./dryrun            # test x3270

To install: 

    make -f Makefile.openwin install

Before running x3270, you will also need to (once): 

    xset fp rehash

Sun OpenWindows, Version 2

OpenWindows 2 does not include the the Athena Widgets (Xaw) or Xmu
libraries, so x3270 cannot run under it. 

Systems Based on System V, Release 4

Before running xmkmf, you must uncomment a line in the Imakefile to
include the network libraries: 

  EXTRA_LIBRARIES = -lnsl -lsocket

Mixed X Environments

If you are running a mixture of X environments, such as running a Sun
XNews server but using X11R5 libraries and header files, the supplied
Imakefile may not work properly, because it assumes that your server and
libraries are of the same type. This is not an impossible situation, just a
difficult one. It generally means that you will have to build and install the
fonts separately, perhaps even by hand, and you may have to install the
app-defaults file by hand. 

Some tools are available to help. If you need to build fonts for an XNews
(Sun OpenWindows) server, but otherwise are using X11R4 or X11R5
libaries to build x3270, you can build and install OpenWindows fonts
separately with the commands: 

    make -f Makefile.openwin fonts
    make -f Makefile.openwin install.fonts

Building Fonts for X Terminals

The Imakefile that comes with x3270 assumes that you plan to run the x3270
client on the same workstation as your X server. Therefore it builds fonts for
that kind of X server. Compiled fonts (.snf or .pcf files) are not compatible
between different servers, so if you run x3270 with its display somewhere
else (such as on an X Terminal), you will need to compile the fonts for that
server. It is impossible to give comprehensive instructions here; however,
here is an outline for how to do it: 

   Copy all of the .bdf files from the x3270 distribution into a new
   directory, say XXX. 

   cd into XXX. 

   For each .bdf file, run the server-specific version of bdftosnf to
   create a .snf file. For example, for to build an NCD font on a Sun-4,
   the command is: 

           /usr/local/NCD/binSun4/bdftosnf 3270.bdf >3270.snf

   Run the server-specific version of mkfontdir. For example: 

           /usr/local/NCD/binSun4/mkfontdir .

   Then tell your X server to use this directory: 

           xset fp+ XXX
           xset fp rehash

SCO Open Desktop 3

You will need to edit a few files in order to build under SCO Open Desktop
3. 

In globals.h, remove the "#define NO_SYS_TIME_H" that is defined for
sco. 

In Imakefile, add: 

        EXTRA_LIBRARIES = -lnsl_s -lsocket

Also be aware that x3270 requires the Athena Widgets library, which is
available from sosco.sco.com. 
