[Scummvm-devel] Conditionally compiling components (Was: Clarifying & cleaning configure's cross-compiling craziness)

Max Horn max at quendi.de
Wed May 4 17:18:29 CEST 2011


Hi again,

another issues I raised on <https://gist.github.com/955116> is how the Indeo3 codec.

The indeo3 code is only enabled if gob is compiled in, or dynamic plugins are enabled. 

It seems odd that we do this for indeo3, but not for e.g graphics/png.*, graphics/jpeg.*, graphics/dcl.* etc. Let's either drop the indeo3 check, or add check for more "optional" features.

An alternative is of course to use #ifdef's to only conditionally compile certain files. So the jpeg code only needs to be compiled in when dynamic plugins are active, or at least one of groovie, mohawk or sci (via qt_decoder via mjpeg) is enabled. 

As you can see, one problem here is that dependencies can be indirect: SCI does not use jpeg directly, but indirectly it does... So I think that *if* we really want to go along the road of only compiling in stuff that is really needed (in order to preserve space), we need a good way to model dependencies of "components" inside configure... So in the above, SCI code depend on the "QT_DECODER" component, which in turn depends on "JPEG" (among others)... This could get quite messy.

Alas, it *is* annoying that e.g. the whole jpeg decoder is currently *always compiled in, even when unused -- for the Nintendo DS port, this accumulates to quite a big problem, I think. 

So, how do we deal with this?

Bye,
Max



More information about the Scummvm-devel mailing list