This information provided by Adam Kerrison (adam@micromuse.co.uk)

AIX 4.2.1
~~~~~~~~~

Has imake but no xmkmf. You need to run "imake -I/usr/lib/X11/config" to
bootstrap the Makefile in the first place. However, IBM's cpp complains
about /*'s in comments in Xbae.tmpl. The #defines that are commented out
should be done done via XCOMM to shut this up.

Static library builds fine. However, if you want a shared library it fails.
This is due to IBM's completely screwed up config files. Firstly, they #define
HasSharedLibraries as NO (which is a lie) and even if you define this yourself
it still won't pull the Shared library rules in so the Makefile won't work.

The workaround is to include <ibmLib.tmpl> and <ibmLib.rules> yourself in the
Imakefile. This gets the object files built but the library still fails.
You need to add a line to specify the libraries the Xbae lib needs. AIX has an
odd way of handling shared libraries - think of it as linking a program, you
need to supply all the libraries to "link" it.  You do this by adding
"REQUIREDLIBS=-lXm -lXt -lX11" to the Makefile. You'll still get a warning:
"ld: 0711-327 WARNING: Entry point not found: __start" but this OK. You then
have a shared library !

The X configs build the shared lib as libXbae.so.a but the AIX linker wont
understand this filename if you use -lXbae so you need to say -lXbae.so OR
rename libXbae.so.a to be libXbae.a (as long as you don't have a static lib
too). 

I'm not sure that this is the perfect way to do things on AIX but its seems
to work.

As a side note: the IBM ANSI C compiler issues a warning about Utils.c saying
that some optimizations have been skipped (due the size of the file ??)


HP-UX 9.07 and 10.10
~~~~~~~~~~~~~~~~~~~~

Doesn't have imake at all ! You basically have to build a Makefile from
scratch (I based mine on the one I generated for AIX (above)). You need to
get the compiler options right. I used:

cc -z +DA1.0 +DS1.0 -D_HPUX_SOURCE +z

-z			Force deref of NULL pointer to cause SIGSEGV
+DA1.0			Force 800 series code generation
+DS1.0			Force 800 series code generation
-D_HPUX_SOURCE		Prevent all sorts of "odd" things happening
+z			PIC flag for HP ANSI C compiler

On HP-UX 9.07 you also need: -I/usr/include/X11R5 -I/usr/include/Motif1.2

Building the shared lib is fairly easy. I used: ld -b -o libXbae.sl $(OBJS)

On HP-UX 10.x you can also use the +h ld switch to give the shared library an
"internal" name. This is useful when linking to stop ld storing the path
used at link time in the binary. We use this as all our "development" things
live in odd places (i.e. not in /usr/lib !) so, at runtime, the dynamic
loader looks in the "right" place. For example: if you keep you Xbae lib in
/master/lib/libXbae.sl when you link to it the compiler will store that path
in the binary. By using "+h /usr/lib/libXbae.sl" when you make the shared
lib the compiler will store that path (but you need to supply the shared lib
with your application and tell the user where to put it !

As another side note: The HP-UX 10.x ANSI C compiler also issued a warning
about Utils.c saying "Exceeding compiler resource limits in xbaeResize; some
optimizations skipped. Use +Onolimit if override desired"

HP-UX 9.x says the same but doesn't support the +Onolimit switch to override
- you just have to live with it. It also complains about Methods.c and
ScrollMgr.c ! (I think its limits are too small then !)

(I'll be "porting" the Xbae libs to HP-UX 11.x when my compiler turns up !)


Solaris 2.x SPARC and Intel(x86)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Use xmkmf :-) but remember to edit Xbae.tmpl to put the /usr/dt paths in (I
didn't :-). However, that generates a Makefile for Sun's ANSI C. I prefer
GCC so you need to hack the Makefile (again !) to remove the -xF option
and change -K PIC to -fPIC. Once I'd done this, the Makefile works on SPARC
and Intel variants.

(GCC doesn't warn about optimisation overloads like the HP and IBM compilers
which just goes to prove that free software IS better :-)


Sun OS 4.1.3
~~~~~~~~~~~~

I have X11R5 installed (not OpenWindows) so I just used "xmkmf -a" :-)

Sun OS might be the oldest OS I still use but its still the easiest to
build on !
