		    PORTING Qt TO OTHER PLATFORMS

Read this file if you want to port Qt to a new platform or C++
compiler.  If you come across any problems, feel free to send mail to
qt-bugs@trolltech.com.

			     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 and
templates. 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

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 incompatible patches for the same platform floating around the
net.) 

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

			 PORTING INSTRUCTIONS

In the configs/ directory you will find several build configuration
files for all platforms supported by Qt.  You can generate your own
config files by using the makeconfig script in the bin/ directory.

1) Download and install tmake; ftp://ftp.trolltech.com/freebies/tmake/

2) Create your own tmake configuration, for example:

	/local/tmake/lib/solaris-cxx/

   This directory must contain a tmake.conf file (with compiler
   options) and a few tmake template (*.t) files.  Copy these from
   one of the other configurations and modify tmake.conf as needed.

3) Now run the makeconfig script to generate Qt build configuration
   files in the configs/ directory:

	makeconfig /local/tmake/lib/solaris-cxx

4) Run the configure script to create your new makefiles.

Modify qt/src/tools/qglobal.h as required: 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).  

There are also some size-dependent types (Q_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.)

Make a unified diff (diff -u) and send the patch and your new tmake
configuration to qt-bugs@trolltech.com.

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

