[asterisk-dev] Is there some standard way modules indicate their dependencies in the source code or config files?
Tilghman Lesher
tlesher at digium.com
Wed Nov 10 11:33:27 CST 2010
On Monday 08 November 2010 01:23:12 Olle E. Johansson wrote:
> 7 nov 2010 kl. 23.14 skrev Paul Belanger:
> > On Sun, Nov 7, 2010 at 4:00 PM, Frank Church <voipfc at googlemail.com>
wrote:
> >> Is there some standard way modules indicate their dependencies in the
> >> source code or config files?
> >
> > I too would like to see something listed on the wiki and it should not
> > be too hard to implement. Often I set autoload=no within modules.conf,
> > only to find myself 'grep'ing the .c files looking for a specific
> > function or application.
>
> I think the question is how a module indicates a dependency of something
> that configure has found. The answer is that we have XML code in the top
> of each module that menuselect reads. LIke:
>
> /*** MODULEINFO
> <depend>res_features</depend>
> ***/
>
> Or a more complicated one from app_voicemail.c
>
> /*** MODULEINFO
> <depend>res_adsi</depend>
> <depend>res_smdi</depend>
> ***/
>
> /*** MAKEOPTS
> <category name="MENUSELECT_OPTS_app_voicemail" displayname="Voicemail
> Build Options" positive_output="yes"
> remove_on_change="apps/app_voicemail.o apps/app_voicemail.so
> apps/app_directory.o apps/app_directory.so"> <member
> name="ODBC_STORAGE" displayname="Storage of Voicemail using ODBC">
> <depend>unixodbc</depend>
> <depend>ltdl</depend>
> <conflict>IMAP_STORAGE</conflict>
> <defaultenabled>no</defaultenabled>
> </member>
> <member name="IMAP_STORAGE" displayname="Storage of Voicemail
> using IMAP4"> <depend>imap_tk</depend>
> <conflict>ODBC_STORAGE</conflict>
> <use>ssl</use>
> <defaultenabled>no</defaultenabled>
> </member>
> </category>
> ***/
>
> /O
Additionally, if you are creating new dependencies in configure.ac, you
should note that you also need to alter build_tools/menuselect-deps.in, or
you will probably become frustrated when the dependency does not resolve.
--
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org
More information about the asterisk-dev
mailing list