# Note: depends on patch
# Note: depends on autoconf
wget -c http://www.libsdl.org/release/SDL-1.2.15.tar.gz
tar -xzf SDL-1.2.15.tar.gz
cd SDL-1.2.15
# Patch to fix compatibility with recent libX11 on x86_64
wget -c http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/libsdl/files/libsdl-1.2.15-const-xdata32.patch
patch -p1 < libsdl-1.2.15-const-xdata32.patch
./autogen.sh
mkdir -p build
cd build
../configure --prefix="/usr"
make # Doesn't mind -j#
make install