[RFC] new build configuration scheme

Samuel Hocevar sam at zoy.org
Thu Aug 29 15:51:00 CEST 2002

   Ok, first, as you might have seen, I am fiddling with automake
and having a look at how well it could be integrated with the vlc
build process. This is not my point here, I'm waiting until I have a
properly working tree and real figures on how it improves build speed
and maintenance before talking about it (by the way, for those worried
about insane dependencies, we dropped the dependency on gettext, and I
will not try to use libtool) (I promise) (I swear).

   I would like to rethink the build configuration, because the current
one is not acceptable for several reasons:

  1. there is no way to do an "autoprobe" run, checking all possible
libraries and autoselecting modules that can be built.
  2. similarly to 1., plugins are sometimes chosen while they have no
real reason to be built (for instance, X11 under MacOS X).
  3. there is no way to choose whether a module will be compiled as
a plugin or as a builtin from the commandline, you need to tune the
resulting Makefile.config afterwards.
  4. Makefile.config is almost impossible to edit for a normal human
being; this is because the format is a compromise between human
readability and build automation... as a result, we get 3. as well as
disastrous build speed because of the shell magic involved (see the
bottom of Makefile.old, or Makefile.modules)

   My suggestion is: let's tune the config file before launching
configure. Have a simple file (similar to the Linux kernel's .config)
parsed by ./configure, with simple lines like this:

plugin video_output/x11/x11 video_output/aa
plugin video_output/sdl
builtin video_output/x11/xvideo
disable video_output/ggi
plugin audio_output/sdl
builtin audio_output/oss
disable audio_output/alsa audio_output/arts

   I hope the keywords speak for themselves. Modules not explicitely
listed here would be automatically probed, so that running ./configure
without specifying a config file would build vlc with most modules
activated, without any of them failing. One could also have a
"--with-config=..." or "--with-modules=..." flag to specify alternate
configuration files.

   Has anyone ideas for a better format maybe? I'm not very pleased by
the current format, mostly because the full path to the module needs to
be specified. I considered returning to the old naming scheme, where two
modules couldn't have the same name, but that leaves us with problems
such as "sdl.c" which is both in the audio_output and the video_output
directories. What do you think? Should we name the plugins "aout_sdl.so"
and "vout_sdl.so"? I must admit this could make our lives easier.

   The config file would then become:

plugin x11 aa
plugin vout_sdl
builtin xvideo
disable ggi
plugin aout_sdl
builtin oss
disable alsa arts

   Or shorter:

plugin x11 aa vout_sdl aout_sdl
builtin xvideo oss
disable ggi alsa arts


This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://www.videolan.org/lists.html
If you are in trouble, please contact <postmaster at videolan.org>

More information about the vlc-devel mailing list