[asterisk-dev] Add module dependecy in build system

Catalin Stanciu catacsdev at gmail.com
Sun Mar 6 15:43:43 CST 2016


Thank you, George.

On Sun, Mar 6, 2016 at 10:08 PM, George Joseph <george.joseph at fairview5.com>
wrote:

>
>
> On Sun, Mar 6, 2016 at 1:56 PM, Catalin Stanciu <catacsdev at gmail.com>
> wrote:
>
>> Hello,
>>
>> I am trying to include a module dependency in  the asterisk build system,
>> but after some hours of research I couldn't found any useful information.
>> To start I have followed the asterisk manual (
>> https://wiki.asterisk.org/wiki/display/AST/Build+System+Architecture)
>>
>
> ​What library are you trying to add as a dependency?​
>

I am trying to add mongo c driver library. The includes and libs can be
added by using:
pkg-config --cflags libmongoc-1.0
pkg-config --libs libmongoc-1.0

and I have found that mongoc_init it's a symbol defined in the library.

>
>
>>
>> 1. I have used the AST_EXT_LIB_SETUP and AST_EXT_LIB_CHECK functions to
>> configure in configure.ac
>>
>
> ​After you modified configure.ac did you run ./bootstrap.sh to recreate
> ./configure and then run ./configure?
>

Oh, this is the step I didn't know. (Thank you)


>
> Does ./configure report that it's finding your new dependency?
>

For now it reports not found:

checking for mongoc_init in -lmongoc... no
I have selected the mongoc_init symbol by using this command:
> nm -g  /usr/local/lib/libmongoc-1.0.so


> Does config.log show your variables being set?
>

In config.log I found this variables related to my configuration:

MONGOC_DIR=''
MONGOC_INCLUDE=''
MONGOC_LIB=''
PBX_MONGOC='0'



>
>
>> 2. I have included in build_tools/menuselect-deps.in the line similar to
>> other dependencies
>> 3. I have included in makeopts.in  two lines one for LIB and the other
>> for INCLUDE.
>>
> 4. Finally I have included in the module source code the lines with
>> MODULEINFO
>>
>> I don't know what I am doing wrong but I think the documentation for
>> build  system architecture must have some examples with explanation of
>> complex cases.
>>
>
> ​What's happening (or not happening)?​
>
>
>> Thank you.
>>
>> --
>> _____________________________________________________________________
>> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>>
>> asterisk-dev mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>>
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20160306/463157a5/attachment.html>


More information about the asterisk-dev mailing list