@html_text_substitution=readme.txt|<a href="../readme.html">readme.txt</a>
@html_text_substitution=docs/build/unix.txt|<a href="unix.html">docs/build/unix.txt</a>
@html_text_substitution=docs/build/macosx.txt|<a href="macosx.html">docs/build/macosx.txt</a>
@external-css=../allegro.css
@document_title=Notes on building the Darwin/X11 version of Allegro
@<pre>
     ______   ___    ___
    /\  _  \ /\_ \  /\_ \
    \ \ \L\ \\//\ \ \//\ \      __     __   _ __   ___ 
     \ \  __ \ \ \ \  \ \ \   /'__`\ /'_ `\/\`'__\/ __`\
      \ \ \/\ \ \_\ \_ \_\ \_/\  __//\ \L\ \ \ \//\ \L\ \
       \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
	\/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
				       /\____/
				       \_/__/

   Notes on building the Darwin/X11 version of Allegro.

   Written by Jeremiah Blanchard.

   See docs/build/unix.txt for general Unix information.

   See readme.txt for a more general overview.
@</pre>



@heading
Darwin Notes

   This file explains how to build the X Window port of Allegro on a Darwin
   system.

   <b>If you are running MacOS X, you are strongly encouraged to use the MacOS
   X native port; read <tt>docs/build/macosx.txt</tt> for more info.</b>

   It is important to note that there is no sound because the sound drivers
   have not yet been ported.

   This library cannot yet be compiled as a shared library, only static.


@heading
Required software

   If you are running MacOS X, you must download the developer tools. This
   requires free registration with Apple. You can register and download the
   tools at:
<blockquote>
      <link>http://connect.apple.com</a>
</blockquote>
   Recently, GCC 3.1 has been released which supports the Mach-O binary
   format, and you may be able to use it directly (if you compile it
   yourself or find a binary distribution.)

   You will also need X Window. You can use either the Darwin/MacOS X port
   of XFree86 from the XonX project or Xtools, a proprietary version. The
   XonX project is located at:
<blockquote>
      <link>http://sourceforge.net/projects/xonx</a>
</blockquote>


@heading
Installing Allegro

   First, decompress the .tar or .zip file into some directory. Next, open
   up a terminal (in MacOS X, this can be found in Applications/Utilities).
   From here, enter the directory into which Allegro has been decompressed.

   If you are using the .zip file, type the following:
<textblock>
      chmod +x fix.sh
      ./fix.sh unix
<endblock>
   From here on everything is a pretty standard Unix-style install process. 
   First you configure it with at least the following options:
<textblock>
      ./configure --enable-static --disable-shared --disable-pthreads
<endblock>
   It should automatically build dependencies.

   Then you build it:
<textblock>
      make
<endblock>
   If you are using an older version of Apple's tools, you will probably see
   lots of preprocessing errors. Just ignore them (they are due to Apple's
   modifications to GCC and do not affect the resulting object code).

   To install Allegro, you will need root permissions. If you don't have 
   root permissions set up on your system (in MacOS X, for example), you 
   will first need to activate the root account. This can be done by running
   the program "NetInfo Manager" in Applications/Utilites. From within the
   program, go to the "Domain" menu, select "Security" and "Authenticate".
   Type in your password and go to "Domain", "Security", "Root User Enable".
   I strongly urge you to set your root password in the same menu.

   Now, type the following in the terminal:
<textblock>
      su -c "make install"
<endblock>
   To install the man pages, type:
<textblock>
      su -c "make install-man"
<endblock>
   If prompted for a password, type in your root password.



@heading
Using Allegro

   When compiling a program using Allegro, you will have to link to the
   following libraries:
<textblock>
      -lalleg -lX11 -lXext
<endblock>
   If you are using the XFree86 port, you will also have to add:
<textblock>
      -lXxf86vm
<endblock>
