Compiling E-UAE
===============

E-UAE should be able to compile on any platform with a POSIX-like shell
environment, a C compiler and make. Version 2.95 or newer of the GNU C
Compiler is recommended as is GNU make, but alternative compilers and
versions of make may work.

Currently zlib is currently required to build E-UAE for all supported
platforms.


Configuring
===========

The first step to compiling E-UAE is to generate a makefile suitable for
your intended target system. This is done by running the configure script.

Run ./configure --help to see the list of options that the configure script
supports. Most options will automatically default to appropriate values.

Here are a selection of the the supported options:

The config script for UAE supports a bunch of compile-time options for
selecting what features are built into UAE. Here's a selection:

--enable-jit
  Build CPU emulation with JIT compiler. Currently only supported on x86
  platforms (known to work on Linux and BeOS, but should work on other
  Unices). Defaults to enabled when building for x86.

--enable-natmem
  If building the JIT, include support for direct memory access (which
  greatly improves performance). Currently only supported on Linux. Defaults
  to enabled when building for Linux/x86.

--enable-autoconfig
  Include emulation of the Amiga's autoconfig expansion system. Required for
  emulating ZII or ZIII memory, emulating disks, SCSI devices, network
  stacks - in fact, most of the cool stuff that UAE can do. Currently
  defaults to enabled providing thread support is available (which should be
  on all the supported host platforms). This dependency on threads will
  eventually be removed.

--enable-aga
  Support emulation of AGA chipset. Defaults to true. Required if you want
  to emulate an A1200, A4000 or CD32.

--enable-scsi-device
  Build with SCSI emulation. This requires the libscg and libschily
  libraries and headers from cdrtools 2.0.x (see below).

--enable-cdtv
  Enable CDTV emulation. Requires SCSI emulation. Defaults to enabled if
  SCSI emulation is enabled.

--enable-cd32
  Enable CD32 emulation. Requires SCSI emulation and AGA support be enabled.
  Default to enabled if both these are enabled.

--enable-bsdsock
  Build with support for emulated network stack (an emulated
  bsdsocket.library). This works only of Unix platforms at the moment
  (including Linux and OS X) and requires the companion bsdsocket.library
  module to be installed on the Amiga side of the emulation (this is available
  in the amiga/ folder of the UAE distribution).

--enable-bsdsock-new
  Build with Jeff Shepherd's new network emulation. Doesn't require the
  companion bsdsocket.library like the above option (bsdsocket.library is
  created dynamically by the emulation), but this solution has portability
  problems. It currently only works on Unix-like x86, AMD64 and PPC
  platforms.

--with-caps
  Build with support for IPF (CAPS) images. This requires the IPF
  development files from http://www.caps-project.org/

--with-caps-prefix=<dir>
  Optional absolute path to where the CAPS API is installed on your system.

--with-sdl-gfx
  Use SDL library for graphics output.

--with-sdl-sound
  Use SDL library for audio output.


Note that the '--enable-xyz' options all have a '--disable-xyz' counterpart
to disable that feature.


Compiling on MacOS X
--------------------

At the moment, only building against the SDL framework is supported.
Configure with

./configure --with-sdl-gfx --with-sdl-sound

and any other options you fancy.

If you are building on x86 OS X box, then the SDL test in the configure
script currently fails. It should build okay if you disable the SDL test.
That is, configure with:

./configure --with-sdl-gfx --with-sdl-sound --disable-sdltest

I've not test this myself, however, since I don't have OS X 10.4 or a
MacIntel box.


Building the SCSI emulation
---------------------------

E-UAE's SCSI emulation currently requires libscg, the SCSI transport layer
from the cdrtools project (see
http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html).

If libscg is not available on your build system, download a recent version
of cdrecord and compile it. Then run the ./src/install_libscg script in the
E-UAE source archive to move the relevant files from cdrecord to the E-UAE
source directory.

If your system has the libscg headers and library installed in a
non-standard location, you can pass the --with-libscg-prefix option or the
--with-libscg-includedir and --with-libscg-libdir options to the configure
script to specify where these are installed.
