Compiling Audacity under Mac OS X using gcc

Authors:
  Dominic Mazzoni

================================================================
This version is currently accurate for Audacity version 1.2.0.
Last Updated: July 26, 2003
If the advice here is inaccurate or incomplete, please
email audacity-devel@lists.sourceforge.net.
================================================================

Note: Audacity is no longer supported at all for Mac OS 9.

This document assumes you are using Mac OS X 10.2.6 with
Apple's December 2002 Developer Tools or newer.  If you
type "gcc --version" at your prompt, you should see:

  gcc (GCC) 3.1 20020420 (prerelease)

If you have gcc 3.3 (Summer 2003), that should be fine.

Only the command-line build process is officially supported,
because it's easier to keep it in sync between the various
platforms.  However, you are welcome to develop for Audacity
using Apple's Project Builder or some other tool.  We suggest
that you follow the instructions below to compile Audacity
using the automated command-line build process first, and
only then consider using an IDE.  That way you have a working
Makefile as a guide.

---------------------------
STEP 1:  Download wxWidgets
---------------------------
To simplify the implementation of a near-identical user
interface across platforms, Audacity uses classes and
resources from wxWidgets, a portable GUI framework for C++
(and Python).  You must download and build wxWidgets before
attempting to compile Audacity, or nothing will work!

wxWidgets is available from http://www.wxWidgets.org.
Similar to the Linux kernel, wxWidgets is available as
stable and development branches.  

The Mac version of wxWidgets is still a little bit unstable,
and none of the releases support 100% of the features that
Audacity needs.  In particular, version 2.4.1 breaks some
features that were working in version 2.4.0.

The best way to compile Audacity is to download wxMac 2.4.0
and apply a patch which adds a couple of the features that
Audacity needs.  More instructions are below.

For step 1, just download wxMac 2.4.0 from http://www.wxWidgets.org/
Click on the "Download" link on the left, then click on the link
to the main download site "http" (or ftp, if you prefer), click on
the 2.4.0 directory, and download:

  wxMac-2.4.0.tar.gz

Direct download link:

  http://biolpc22.york.ac.uk/pub/2.4.0/wxMac-2.4.0.tar.gz

Remember that version 2.4.1 will NOT work with Audacity.

Uncompress wxMac from the command line by typing:

  tar xvzf wxMac-2.4.0.tar.gz

Do not compile wxWidgets yet - you need to patch it in step 3.

--------------------------
STEP 2:  Download Audacity
--------------------------
You can find the latest Audacity source code from
http://audacity.sourceforge.net/

To retrieve the latest version from CVS, use the following
commands:

  cvs -d :pserver:anonymous@cvs.audacity.sourceforge.net:/cvsroot/audacity login
  cvs -d :pserver:anonymous@cvs.audacity.sourceforge.net:/cvsroot/audacity checkout audacity

--------------------
STEP 3:  Apply patch
--------------------
You will need to navigate to inside the wxMac directory
and from there, apply a patch from the audacity/mac directory.
In the example below, I am assuming that both wxMac and
audacity are in your home directory (~); you will need to change
the paths accordingly depending on where you put them.

  cd ~/wxMac-2.4.0
  patch -p 1 < ~/audacity/mac/wxMac-2.4.0.patch

----------------------------------
STEP 4:  Compile and install wxMac
----------------------------------

mkdir macbuild
cd macbuild
../configure --disable-shared
make
sudo make install

[ Type your Mac OS X password ]

-------------------------
STEP 5:  Compile Audacity
-------------------------

To compile everything:

./configure --with-help --with-libflac
make

