[SDL] SDL_ttf and SDL_image with autoconf/automake/libtool

Thomas Krennwallner krennwallner at aon.at
Sat Dec 28 10:10:00 PST 2002


Hi!

I have a projects which needs SDL_ttf and SDL_image. It also uses the
auto*/libtool tools. To find SDL I copied sdl.m4 to my m4 directory and
called AM_PATH_SDL in configure.ac. Then I check for SDL_ttf with

AC_CHECK_LIB(SDL_ttf, TTF_Quit, have_sdl_ttf=yes)

If it's found I add -lSDL_ttf to LIBS through

LIBS="$LIBS -lSDL_ttf"

Same procedure with SDL_image.

All works fine if the libraries are installed in the "right" places
(eg. /usr/local). But if SDL/SDL_ttf/SDL_image is installed in eg.
~/local/lib (and I pass --with-sdl-prefix=~/local to my configure
script) _and_ in /usr/local/lib (/usr/local/lib is another version
of the libs), libtool tries to link with SDL in ~/local _and_ /usr/local
like this:

gcc -SOME_PARAMS -L/home/user/local/lib /home/user/local/lib/libSDL.so -lm -L/usr/X11R6/lib -lX11 -lXv /home/user/local/lib/libSDL_image.so -lpng -lz /usr/local/lib/libSDL_ttf.so /usr/local/lib/libSDL.so -lpthread -lfreetype .....

There is no /usr/local/lib/libSDL_ttf.so so the link fails.

So my question is: how do I setup the auto*/libtool tools with the SDL
library gang the right way?

So long
Thomas

-- 
  ___    Obviously we do not want to leave zombies around.
_/___\     - W. Richard Stevens
 ( ^ >   Thomas Krennwallner <krennwallner at aon dot at>
 /   \   1024D/67A1DA7B 9484 D99D 2E1E 4E02 5446  DAD9 FF58 4E59 67A1 DA7B
(__\/_)_ http://members.aon.at/krennwallner/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20021228/729e5cc8/attachment.pgp>


More information about the SDL mailing list