HOW TO COMPILE AND INSTALL XAOS
-------------------------------

Last modification information:
$Header: /cvsroot/xaos/XaoS/doc/INSTALL,v 1.1 2003/03/18 10:08:15 kovzol Exp $


For Unix/X11:

   To compile XaoS you need optimizing ANSI compatible C compiler and at
   least one of the following libraries:

    o Xlib
    o SVGAlib
    o AA-lib 
    o GGI

   To compile XaoS with image saving code you also need zlib and pnglib
   installed. They are available at:

   ftp://ftp.uu.net/graphics/png/src/zlib-0.95.tar.gz
   ftp://ftp.uu.net/graphics/png/src/libpng-0.81.tar.gz

   AA-lib is a library alowing high quality ascii-art output from XaoS
   available at AA-project homepage http://aa-project.sf.net. You need
   at least version 1.4. (At the time of writing this documentation,
   1.4rc2 is out and final version of AA-lib is not released yet. 1.4rc2
   works properly.)

   To use internationalization (i18n) you also need GNU gettext
   (which is automatically available on most Unix systems and also
   exists on DOS).

   XaoS now have a configure script so following should work correctly:

        CFLAGS=(your best size optimizing switches)
        CFLAGS1=(your best speed optimizing switches)
	export CFLAGS

	   # Note that these two steps are not required on PC/Linux
           # and for all gcc compilers XaoS uses quite good switches.
           # But this is REQUIRED for other compilers, because XaoS
           # is coded to be a good target for optimizer and NEEDS to
           # be optimized to work in reasonable speed.

	./configure [options...usually not required]
	make
	make install

   You may also read compilers.txt, that contain info about various
   compilers, best optimizing switches and common problems, since XaoS
   often forces compilers (including gcc) to crash/generate wrong code.
   
   For better results:
   Edit src/include/config/config.autoconf to reflect your system. 

   IMPORTANT NOTE:
   XaoS can optionally use long double for zooming. It allows
   deeper zooms with no performance lost on Intel platforms. Some
   other platforms supports long double too, but it is usually
   emulated so it is incredibly slow. Configure script by default
   enables long double just on i?86 and unknown processors.

   If you have processor reported as unknown that is non Intel and
   XaoS is incredibly slow, please try:

   ./configure -with-long-double=no
   make clean
   make

   to recompile XaoS. Please let me know about this problem, so
   autodetection may be included in future versions of configure
   script.

   If you have time to experiment and have some non Intel compatible
   platform, please try:

   ./configure -with-long-double=yes
   make clean
   make

   And try whether XaoS still works at same speed (framerate is
   displayed using l key) and let me know in case that XaoS still works
   at same higher/bit slower (not 100 times or so) speed, so I your
   platform can be autodetected in future version of the script. I did
   unsuccesful tests on following architectures/processors:

   HP425e - Motorola MC68040
   HP700 - Parisc
   SGI
   SUN

   But it can differ at various processor types, so I don't say
   that all SGI's or SUN's do not work with long double.

   Options available:

     By default XaoS will try to configure and compile following drivers:

      X11
      SVGAlib
      Curses

     This may cause some problems. To reduce binary file size and/or
     solve such problems you may disable driver using:

      --with-x11-driver=no       to disable X11 driver
      --with-svga-driver=no      to disable SVGAlib driver
      --with-curses-driver=no    to disable (N)Curses driver

     There may be problems with configuring a bit non standard curses
     library. You may use following options:

      --with-sunos-curses        to force SunOS 4.x curses
      --with-osf1-curses         to force OSF/1 curses
      --with-vcurses[=incdir]    to force SysV curses
      --with-ncurses[=base-dir]  to compile with ncurses/locate base dir
      --with-x                   use the X Window System

     Also finding X includes can be a problem:

      --x-includes=DIR          X include files are in DIR
      --x-libraries=DIR         X library files are in DIR

     For Linux gpm library use:

      --with-gpm-mouse=base-dir specifies the base gpm directory

     To enable experimental SMP support use:

      --with-pthread=yes

     note that it is really untested in version 3.0 since I don't have
     an SMP machine :). (Someone who can lend me some?)

     Threaded version works well with aadriver, partially (w/o console
     switching) with SVGAlib driver and X11 driver needs patched Xlib
     for threads. I believe it will be normal soon (when glibc will
     become more popular).

   Note that XaoS is automatically installed with sticky bit enabled
   when SVGA driver is compiled, but it is sticky bit safe since it
   switches to normal privilegies after drivers are initialized.

-----------------------------------------------------------------------------

For Win32:

   To build XaoS you need the CygWin32 compiler v20 or later (a quite
   good GCC clone for Windows. See http://sourceware.cygnus.com),
   DirectX headers hacked for gcc, pnglib and zlib. The build procedure
   is similar to UNIX. Do:

   sh configure
   make

   Everything should be autodetected. If you have installed X11 or GGI
   libraries, XaoS should build their drivers as well.
   
   XaoS compiles on Microsoft Visual Studio as well. Please contact Ray
   Gardener at Daylon Graphics if you are interested in the compilation
   process. He offers commercial support and sells a modified version of
   XaoS for Windows users (the source is free, you have to pay for the
   compilation).

-----------------------------------------------------------------------------

For DOS:

   You need thd DJGPP GNU compiler, Allegro graphics, zlib and pnglib

   Use:

   build.bat
	
   If you get in trouble, please read README2.dos.

-----------------------------------------------------------------------------

For Mac:

    Read README.mac for more information.

-----------------------------------------------------------------------------

For plan9:

    XaoS comes with mk scripts because I am unable to write functional
    mkfile on my reduced system. Start mk and wait..

============================================================================

You may also get a binary distribution.
For more information browse XaoS homepage (http://sf.net/projects/xaos).
