Compile on Mac OSX for X11 (no Cocoa or Carbon) possible?


I’m trying to compile a program on my Mac 10.4 that uses, among other
things, OpenGL, FLTK, and SDL. I’ve already set up FLTK to run on
X11 (not in Cocoa), so I’m trying to compile SDL for the X side. I
can’t seem to get it to work though, it keeps on building SDLmain.a
with the Core Foundation, etc stuff. I’ve looked around quite a bit
on the mailing lists and in the FAQs, and this is how I configure:

% ./configure --with-x --disable-video-cocoa --enable-video-x11 –
disable-audio --disable-cdrom --disable-joystick

It builds successfully, and libSDL.a looks fine. To get my program to
compile though (so _main is resolved), I have to link with
libSDLmain.a, which by looking at it with nm looks like it contains a
bunch of Cocoa stuff (CoreFoundation, etc). What am I doing wrong?
Is there another configuration option to get SDLmain to properly
build without cocoa/carbon support?