Requesting help with installation problem

I posted this problem a week ago, without any response. Has anyone here seen
this problem before, and/or have some idea how to fix it?

The short version, I can’t build SDL apps (e.g some of the demos, or the
programs in the test directory of the SDL download package). When the
configure script tries to make a test app for SDL, it gives the error below.
I can get past this by passing --disable-sdltest, but this just lets it get
to the make stage before the same problem occurs - for the test apps, it
fails on the first one, testver.

My system is an LFS build, using gcc 2.95.3, glibc 2.2.3, and kernel 2.4.5. X
version is 4.1. I’ve tried with several SDL versions, including 1.2.0,
1.2.1, and the latest CVS. All give the same errors.

Here’s the error from configure:

checking for sdl-config… /usr/local/bin/sdl-config
checking for SDL - version >= 1.2.0… no
*** Could not run SDL test program, checking why…
*** The test program failed to compile or link. See the file config.log for
the
*** exact error that occured. This usually means SDL was incorrectly installed
*** or that you have moved SDL since it was installed. In the latter case, you
*** may want to edit the sdl-config script: /usr/local/bin/sdl-config
configure: error: *** SDL version 1.2.0 not found!

And here’s the relevant section of config.log:

configure:2293: gcc -o conftest -s -O3 -march=i686 -mcpu=i686
-fomit-frame-pointer -Wall -malign-functions=4 -funroll-loops -malign-double
-fschedule-insns2 -mwide-multiply -I/
usr/X11R6/include -I/usr/local/include -I/usr/local/include/SDL -D_REENTRANT
conftest.c -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -lpthread 1>&5
/usr/X11R6/lib/libX11.so.6: undefined reference to `atexit’
collect2: ld returned 1 exit status
configure: failed program was:
#line 2278 “configure”
#include “confdefs.h”

#include <stdio.h>
#include “SDL.h”

int main(int argc, char *argv[])
{ return 0; }
#undef main
#define main K_and_R_C_main

int main() {
return 0;
; return 0; }

This example appears to associate libX11 with the undefined reference, but
seems to depend on how I configured SDL. If Arts is enabled, the same error
comes up, but referring to libarts.

Can anyone see a problem? Having played with SDL a few years ago, I was
wanting to have another go, but this is a bit of an obstacle.

Simon Geard.