[asterisk-dev] Is there some standard way modules indicate their dependencies in the source code or config files?

Olle E. Johansson oej at edvina.net
Mon Nov 8 01:23:12 CST 2010


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


More information about the asterisk-dev mailing list