2003-07-08 01:01:16 +08:00
|
|
|
$Id: HACKING,v 1.10 2003/07/07 17:01:16 sam Exp $
|
2002-08-26 07:18:05 +08:00
|
|
|
|
|
|
|
Hacking vlc
|
|
|
|
===========
|
|
|
|
|
2002-09-30 19:05:42 +08:00
|
|
|
Requirements
|
|
|
|
------------
|
|
|
|
|
2002-08-26 07:18:05 +08:00
|
|
|
You will need the following tools if you plan to use the CVS version of vlc:
|
|
|
|
|
2002-08-27 04:49:50 +08:00
|
|
|
- autoconf version 2.50 or later
|
2002-09-30 19:05:42 +08:00
|
|
|
|
|
|
|
- automake version 1.5 (but 1.6 or later is recommended)
|
|
|
|
|
2002-08-27 22:15:24 +08:00
|
|
|
- gettext version 0.10.40 (but 0.11.3 or later is recommended)
|
2002-08-26 07:18:05 +08:00
|
|
|
|
|
|
|
After retrieving the CVS tree, you need to run the bootstrap script to
|
|
|
|
generate all the files needed to build vlc. You can then run configure.
|
|
|
|
|
|
|
|
If you do not have the correct version of these tools, or if they are
|
|
|
|
simply not available for the operating system you plan to develop on,
|
|
|
|
you can check out a CVS tree on an OS that provides these tools (such
|
|
|
|
as a recent Linux distribution), run bootstrap, and then copy the whole
|
|
|
|
tree to your retarded OS.
|
|
|
|
|
2002-10-08 05:58:40 +08:00
|
|
|
There is a possibility that, at some point, automake might segfault. The
|
|
|
|
reason is unsufficient stack size, and can be easily fixed with the
|
|
|
|
`ulimit` command (or an equivalent) available in most shells. For instance
|
|
|
|
on bash 2.0, the following command solves the automake crash on Mac OS X :
|
|
|
|
ulimit -s 20000
|
|
|
|
|
2002-09-30 19:05:42 +08:00
|
|
|
|
|
|
|
The bootstrap sequence
|
|
|
|
----------------------
|
|
|
|
|
|
|
|
The bootstrap script does the following actions:
|
|
|
|
|
2003-06-27 21:50:13 +08:00
|
|
|
- parse configure.ac for all Makefiles in the modules/ directory that need
|
|
|
|
to be generated, and look for available modules in the corresponding
|
|
|
|
Modules.am file. A module "foo" exists if there is a Modules.am file in
|
|
|
|
the modules/ directory which defines SOURCES_foo.
|
2002-09-30 19:05:42 +08:00
|
|
|
|
|
|
|
- create a top-level Modules.am file (which will be included by Makefile.am)
|
|
|
|
which contains additional build rules for modules, and includes all the
|
|
|
|
Modules.am files that were found in modules/
|
|
|
|
|
2003-06-27 21:50:13 +08:00
|
|
|
- create an m4/private.m4 from configure.ac, generating m4 macros that will
|
|
|
|
be needed by configure.ac.
|
|
|
|
|
|
|
|
- create a Makefile.am file for each Modules.am file found in modules/ .
|
2002-09-30 19:05:42 +08:00
|
|
|
|
|
|
|
- run autopoint (previously gettextize) to create an intl/ directory,
|
|
|
|
needed when libgettext is not available.
|
|
|
|
|
|
|
|
- run the usual aclocal, autoheader, automake and autoconf, which create
|
|
|
|
the various Makefile.in files from the corresponding Makefile.am and the
|
|
|
|
configure script from configure.ac.
|
|
|
|
|
|
|
|
- fix a few files in the vlc repository that may have been altered.
|
|
|
|
|
|
|
|
|
|
|
|
How to add a module
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
To add a module to the repository, just add its sources to a Modules.am
|
|
|
|
file. If you create a new Modules.am, do not forget to add a corresponding
|
2003-07-01 19:58:29 +08:00
|
|
|
Makefile line at the end of configure.ac.
|
2002-09-30 19:05:42 +08:00
|
|
|
|
2003-07-08 01:01:16 +08:00
|
|
|
To have the module built, you need to add a call to AX_ADD_PLUGINS or
|
|
|
|
AX_ADD_BUILTINS to configure.ac with your new module name as argument.
|
|
|
|
|