Compile_OSX108 Log in to Edit

About

The process is simple: you make your OSX system more GNU-ish, and then the regular build steps will work.

Availability of needed tools differs from one OSX version to another. Just to be sure, you can try invoking the programs listed below, and see if you already have them.

The guide below was written for OSX version 10.8, and should be directly applicable to it.

Pre-requisites

wget

Already exists on your system. If not, build it from http://ftp.gnu.org/gnu/wget/
curl should be sufficient.

git

Might already exist on your system if you have XCode installed. If not, install it from http://git-scm.com/download/mac

autotools (autoconf, automake)

Might already exist on your system if you have XCode installed. Latest versions of XCode stopped shipping autotools with them, so you might need to install them manually. I used this handy script https://gist.github.com/jellybeansoup/4192307

buildtools (gcc, ld, make)

Might already exist on your system if you have XCode installed. Latest versions of XCode opted for llvm instead of gcc. If you don't have gcc, you can find the "Command line tools for XCode" package on http://developer.apple.com

This package worked for me: http://devimages.apple.com/downloads/xcode/command_line_tools_for_xcode_10_8_late_july_2012.dmg

See also this question: http://stackoverflow.com/questions/9353444/how-to-use-install-gcc-on-mac-os-x-10-8-xcode-4-4

Libraries

SDL 1.2

cd build
curl -k -O https://www.libsdl.org/release/SDL-1.2.15.tar.gz
tar xzf SDL-1.2.15.tar.gz
cd SDL-1.2.15
./configure --disable-video-x11
make
sudo make install

SDL_image 1.2

Requires SDL installed.

cd build
curl -k -O https://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.tar.gz
tar xzf SDL_image-1.2.12.tar.gz
cd SDL_image-1.2.12
./configure
make
sudo make install

Related

Wiki: CompileGuides