This script allows you to have both SDL 1.2 and SDL 1.3 installed.
How to use:
-
Save renamesdl1.3.pl to home directory
-
Compile SDL
svn checkout http://svn.libsdl.org/trunk/SDL
cd SDL
./autogen.sh
./configure --prefix=$HOME/sdl-1.3
make
make install -
run script in the directory SDL 1.3 is installed
cd ~/sdl-1.3
perl ~/renamesdl1.3.pl -
copy files to /usr/local
sudo cp -r * /usr/local
To compile a program using SDL 1.3 instead of SDL 1.2, do this:
gcc `pkg-config sdl-1.3 --cflags --libs` -o program source.c
or this:
gcc `sdl-1.3-config --cflags --libs` -o program source.c
or, if using autoconf, add this to configure.in / configure.ac:
PKG_CHECK_MODULES([SDL_13], [sdl-1.3 >= 1.3.0])
AC_SUBST(SDL_13_CFLAGS)
AC_SUBST(SDL_13_LIBS)
after which you can use SDL_13_CFLAGS and SDL_13_LIBS in your
makefile.in / makefile.am.
Look here if you need help with pkg-config, autoconf and automake:
http://www.openismus.com/documents/linux/using_libraries/using_libraries.shtml#configure
-------------- next part --------------
A non-text attachment was scrubbed…
Name: renamesdl1.3.pl
Type: application/x-perl
Size: 1777 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20090828/609fcd4c/attachment.bin