                        PORTING QT TO OTHER PLATFORMS

Read this file if you want to port Qt to a new platform or C++ compiler.

                               REQUIREMENTS

The new platform needs Xlib for X11R5 or newer.  Motif is not required.
If it is not a Unix system (for instance VMS) things may get complicated.
Porting to other Unixes is generally straight-forward.

Qt requires that your C++ compiler supports multiple inheritance.
Template support is strongly recommended, but not a necessity.  The
compiler must recognize the .cpp extension.  Exception handling and RTTI
(Run-Time Type Information) are not required.  Expect problems with old
CFront-based compilers.

                                 PATCHES

Note that you may not distribute your port without our explicit
permission.  Please send us the patches you had to make so we can add them
to the code base; then we can support the new platform in an orderly
manner.  (We want Qt to run on as many platforms as possible, but _not_ if
that involves patches we don't know about floating around the net.)

Further, we would like to have copies of all Qt-related files on
ftp.troll.no.

                           PORTING INSTRUCTIONS

Make a new directory under arch and fill it in from arch/template:

        cd qt/arch
        mkdir whatever
        ( cd template; tar cf - . ) | ( cd whatever ; tar xf - )

You will need to edit arch/whatever/Makefile and probably
arch/whatever/library/Makefile. You may also have to modify other
Makefiles and qt/src/tools/qglobal.h.

The Makefiles will generally need CFLAGS, CC and so on.  You may need to
add some more libraries.  Edit arch/whatever/Makefile, then say 'make
variables' to copy the changes to all the other makefiles.

For qt/src/tools/qglobal.h you need to ensure that _OS_whatever_ is
defined.  We've done it for many platforms in the past, those should be
okay.  If you are using a compiler we don't detect it's probably a good
idea to add a _CC_whatever_ too (even though you don't need it at once).

If your compiler doesn't support templates, make sure DEFAULT_MACROCLASS
is defined in qglobal.h.

There are also some size-dependent types (UINT32 and so on), make sure
they're right for your system.

Some compilers emit bad warnings when they compile Qt.  If yours does, and
the code in Qt is sane, please use a #pragma or two to shut your compiler
up.  (This is a good reason for wanting the _CC_whatever_ define above.)

To create and send us a patch, do:

	cd qt/arch
	diff -uwr template whatever | mail qt-bugs@troll.no

For most Unix varieties, that's all.  Some may need some include file
tweaks.  Good luck, and feel free to send mail to qt-bugs@troll.no.
