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 prefers that its fonts 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:
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 prefers that its fonts 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
Once these have been installed, you can use the standard X11R5 build procedure above.
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 prefers that its fonts 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
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's 'xmkmf' configuration puts some compiler flags in the Makefile that are specific to Sun's unbundled C compiler. If you are using a different C compiler such as gcc, you may get a number of harmless, but annoying error messages while compiling. To eliminate these, use the command:
make "CDEBUGFLAGS=-O" "CCOPTIONS=-DSYSV -DSVR4"
'xmkmf' also gets the path of the 'install' program wrong. To install x3270, you must use the command:
make INSTALL=/usr/ucb/install install
To run x3270, you must have your LD_LIBRARY_PATH environment variable set properly. First, it must include /usr/openwin/lib. Also, if you are using Sun's BSD-compatibility C compiler, /usr/ucb/cc, you must also use include /usr/ucblib. See the "dryrun" script for details on how to do this.
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 prefers that its fonts 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
EXTRA_LIBRARIES = -lnsl -lsocket
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
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.snfRun 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
Note that with both xaw3d header files and libraries, x3270 will build and run, but it will be rather ugly.
In globals.h, remove the "#define NO_SYS_TIME_H" that is defined for sco.
In Imakefile, add:
EXTRA_LIBRARIES = -lnsl_s -lsocketAlso be aware that x3270 requires the Athena Widgets library, which is available from sosco.sco.com.
Unfortunately, using an app-defaults file is a pain. The mechanism for finding the file is so flexible as to be almost incomprehensible, and it is difficult to run the program without doing a full installation, requiring root access to your system. Also, the app-defaults file generally changes whenever the program changes, and making sure that x3270 finds the correct app-defaults file compounds the above problems.
Starting with version 3.1.0.0, x3270 no longer uses a separate app-defaults file. Instead, the file is compiled into x3270 itself. To change a basic resource definition, you edit a new file, X3270.xad, and recompile x3270.
If however, you prefer to have a separate app-defaults file, you can compile x3270 to use it.
First, you must decide whether you want app-defaults for a color display or a monochrome display. The default is color; if you want monochrome app-defaults you must edit Imakefile or Makefile.openwin (depending on which you are using) and un-comment the line under the comment "Rule for building a separate app-defaults file...".
Then you need to edit Imakefile or Makefile.openwin, and un-comment the lines under the comment "To use a separate app-defaults file...". Then, if you are using Imakefile, do the following:
xmkmf make depend make clean makeIf you are using Makefile.openwin, do the following instead:
make -f Makefile.openwin clean make -f Makefile.openwinWith Makefile.openwin, there is also an extra install step:
make -f Makefile.openwin install.app-defaultsNote that using a separate app-defaults file is not a supported configuration, so if you have problems with such an installation, the first question will be, "Why are you doing it that way?"