Building SDL_image against non-standard location libraries

I’m trying to compile SDL_image and link it against an SDL other than the one
already installed on my system. I built SDL without a problem against uClibc.
I’m configuring SDL_image as so:

env CPPFLAGS="-I/home/jbodnar/projects/mp3/build/libpng-1.2.3
-I/home/jbodnar/projects/mp3/build/zlib-1.1.3 -I/home/jbodnar/projects/mp3/b
uild/SDL-1.2.4/include"
LDFLAGS="-L/home/jbodnar/projects/mp3/filesystem/lib
-L/home/jbodnar/projects/mp3/filesystem/usr/lib"
PATH=/home/jbodnar/projects/mp3/build/i386-linux-uclibc/usr/bin:$PATH
./configure
–prefix=/home/jbodnar/projects/mp3/filesystem/usr
–enable-static=no
–with-sdl-prefix=/home/jbodnar/projects/mp3/build/SDL-1.2.4/src/.libs
–with-sdl-exec-prefix=/home/jbodnar/projects/mp3/build/SDL-1.2.4/
–disable-sdltest
–enable-jpg=no

when I try to compile SDL_image I get the following errors:

gcc -g -O2 -DLOAD_BMP -DLOAD_GIF -DLOAD_LBM -DLOAD_PCX -DLOAD_PNG -DLOAD_PNM
-DLOAD_TGA -DLOAD_XPM -L/home/jbodnar/projects/mp3/filesystem/lib
-L/home/jbodnar/projects/mp3/filesystem/usr/lib -o .libs/showimage showimage.o
.libs/libSDL_image.so -lpng -lz -Wl,–rpath
-Wl,/home/jbodnar/projects/mp3/filesystem/usr/lib
/usr/bin/ld: warning: libc.so.6, needed by
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/…/…/…/libpng.so, may conflict
with libc.so.0
showimage.o: In function draw_background': /home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:46: undefined reference toSDL_MapRGB’
/home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:47: undefined
reference to SDL_MapRGB' showimage.o: In functionmain’:
/home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:93: undefined
reference to SDL_Init' /home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:94: undefined reference toSDL_GetError’
/home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:101: undefined
reference to SDL_ShowCursor' /home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:112: undefined reference toSDL_GetError’
/home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:116: undefined
reference to SDL_WM_SetCaption' /home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:119: undefined reference toSDL_VideoModeOK’
/home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:134: undefined
reference to SDL_SetVideoMode' /home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:136: undefined reference toSDL_GetError’
/home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:143: undefined
reference to SDL_SetColors' /home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:152: undefined reference toSDL_UpperBlit’
/home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:153: undefined
reference to SDL_UpdateRect' /home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:157: undefined reference toSDL_PollEvent’
/home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:195: undefined
reference to SDL_Delay' /home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:198: undefined reference toSDL_FreeSurface’
/home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:202: undefined
reference to SDL_Quit' .libs/libSDL_image.so: undefined reference toSDL_LoadBMP_RW’
.libs/libSDL_image.so: undefined reference to SDL_RWFromFile' .libs/libSDL_image.so: undefined reference toSDL_SetColorKey’
.libs/libSDL_image.so: undefined reference to SDL_CreateRGBSurface' .libs/libSDL_image.so: undefined reference toSDL_SetError’
collect2: ld returned 1 exit status
make: *** [showimage] Error 1

It appears that the build process can’t find my alternative SDL for both
showimage and libSDL_image.so.–
Jason Bodnar
@Jason_Bodnar
http://www.shakabuku.org

–disable-sdltest \

Does this line prevent the CFLAGS and LIBS being queried from sdl-config?
If so, that would explain why -lSDL doesn’t show up in the link line (hence
the errors you’re seeing)

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

–disable-sdltest \

Does this line prevent the CFLAGS and LIBS being queried from sdl-config?
If so, that would explain why -lSDL doesn’t show up in the link line
(hence the errors you’re seeing)

Nope. Removing that line I still get the same thing. I also have the same
problem with smpeg (and I imagine any other library that depends on SDL). I
don’t think it’s an SDL problem, but rather a problem with autoconf, libtool
or perhaps even gcc.

I’ll continue to play around stuff and hopefully figure it out.

Thanks,

Jason–
Jason Bodnar
@Jason_Bodnar
http://www.shakabuku.org