gripes -- Re: [Bf-committers] New render options

Gregor Mückl
Sun, 20 Jul 2003 15:09:33 +0200

Hash: SHA1

Am Sonntag, 20. Juli 2003 13:55 schrieb John K. Walton:
> On Sun, 20 Jul 2003, Gregor [iso-8859-1] Mückl wrote:
> > Hash: SHA1
> >
> > Am Sonntag, 20. Juli 2003 10:48 schrieb Ton Roosendaal:
> > > > P.S. This SDL stuff is a headache too
> > > > -- I think platform maintainers should
> > > > choose their own compile/link flags rather
> > > > than depending on an sdl-config program
> > > > that may or may not be in their path
> > > > (or even installed for that matter).
> > >
> > > My idea too! :)
> >
> > Sorry to tell you, but this is almost impossible to do. SDL itself can
> > create a lot of inpredictable dependencies depending on what backends
> > have been enabled during compile time (and there exist many). The only
> > way to get this right is to use sdl-config. Dropping sdl-config will on=
> > get you into deep trouble. *Never* do this. It's a lot better and safer
> > to add a
> > - --witih-sdl-config={path} option to configure.
> please give specifric example of why this doesn't work, since
> we've had it working fine. also, SDL comes precompiled from
> SGI for irix.

A quick analysis of the way the sdl-config is generated shows that a lot of
libraries may or may not be given as linker arguments by sdl-config. This is
a list of linker flags that may or may not be given by sdl-config:

- -lasound (Linux, others?)
- -laudio (Irix?)
- -laudio -lXt (Irix?)
- -lX11 -lXext (Irix, Linux, others?)
- -lxme (?)
- -lph (?)
- -lggi -lgii -lgg (Linux, others?)
- -lvga (Linux)
- -laa (Linux, FreeBSD, Irix, others?)
- -lgem (Atari?)
- -lGL (Linux, FreeBSD, Irix)
- -framework OpenGL -framework AGL (OSX)
- -luser32 -lgdi32 -lwinmm (Win32)
- -ldxguid (Win32)
- -lusbhid (?)
- -lusb (?)
- -lossaudio (Linux, Irix?)
- -lroot -lbe -lmedia -lgame -ldevide -ltextencoding (BeOS?)
- -framework IOKit (OSX)
- -framework Cocoa -framework Carbon -framework QuickTime (OSX)
- -framework Cocoa (OSX)
- -framework OpenGL (OSX)

This list may not be complete. Furthermore it's obvious that many of these
flags are only valid for a limited number of platforms. Nonetheless there are
a couple of platforms where several combinations of these optional flags are
valid. Also assume that if a library is given by sdl-config it is pretty
likely that this library does not exist on this system.

It is certain that all of these flags can be given by sdl-config.

Note that esp. on Linux the variety of possible flags is great. Note also that
there are (probably buggy) Linux distributions where the linker will not
handle dependencies correctly that are introduced by libraries a program is
linked against. In this case all indirect dependencies must be passed to the
linker. Linking against OpenGL required not only a -lGL flag but also -lX11
- -lXext -lXt and a couple of other flags to work correctly.

If that does not convince you, nothing will - in which case you are incredibly

Version: GnuPG v1.2.1 (GNU/Linux)