<div dir="ltr"><div class="gmail_default" style="font-family:'arial narrow',sans-serif"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 6, 2016 at 2:43 PM, Catalin Stanciu <span dir="ltr"><<a href="mailto:catacsdev@gmail.com" target="_blank">catacsdev@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thank you, George.<br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Sun, Mar 6, 2016 at 10:08 PM, George Joseph <span dir="ltr"><<a href="mailto:george.joseph@fairview5.com" target="_blank">george.joseph@fairview5.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div style="font-family:'arial narrow',sans-serif"><br></div><div class="gmail_extra"><br><div class="gmail_quote"><span>On Sun, Mar 6, 2016 at 1:56 PM, Catalin Stanciu <span dir="ltr"><<a href="mailto:catacsdev@gmail.com" target="_blank">catacsdev@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>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.</div><div>To start I have followed the asterisk manual (<a href="https://wiki.asterisk.org/wiki/display/AST/Build+System+Architecture" target="_blank">https://wiki.asterisk.org/wiki/display/AST/Build+System+Architecture</a>)</div></div></blockquote><div><br></div></span><div><div style="font-family:'arial narrow',sans-serif">What library are you trying to add as a dependency?</div></div></div></div></div></blockquote><div><br></div></span><div>I am trying to add mongo c driver library. The includes and libs can be added by using:</div><div>pkg-config --cflags libmongoc-1.0</div><div>pkg-config --libs libmongoc-1.0<br></div><div><br></div><div>and I have found that mongoc_init it's a symbol defined in the library.</div></div></div></div></blockquote><div><br></div><div><div class="gmail_default" style="font-family:'arial narrow',sans-serif">Ah, OK. You want to use AST_PKG_CONFIG_CHECK instead of <span style="font-family:arial,sans-serif">AST_EXT_LIB_CHECK because </span><span style="font-family:arial,sans-serif">AST_EXT_LIB_CHECK requires that you already know cflags and libs.</span></div><div class="gmail_default" style="font-family:'arial narrow',sans-serif"><span style="font-family:arial,sans-serif"><br></span></div><div class="gmail_default" style="font-family:'arial narrow',sans-serif"><span style="font-family:arial,sans-serif">Here's what works for me using the mongodb distribution for RedHat systems.</span></div><div class="gmail_default" style="font-family:'arial narrow',sans-serif"><br></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace">AST_EXT_LIB_SETUP([MONGODB], [MongoDB], [mongodb])</font></div><div><font face="monospace, monospace">...</font></div></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace">AST_PKG_CONFIG_CHECK([MONGODB], [libmongo-client])</font></div><div><font face="monospace, monospace"><br></font></div>and in config.log I get...</div><div class="gmail_default"><br><div><font face="monospace, monospace"><div>MONGODB_CFLAGS='-I/usr/include/mongo-client -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include '</div><div>MONGODB_DIR=''</div><div>MONGODB_INCLUDE='-I/usr/include/mongo-client -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include '</div><div>MONGODB_LIB='-lmongo-client '</div><div>MONGODB_LIBS='-lmongo-client '</div><div><br></div></font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"><br></font></div></div><div class="gmail_default" style="font-family:'arial narrow',sans-serif"><br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>1. I have used the AST_EXT_LIB_SETUP and AST_EXT_LIB_CHECK functions to configure in <a href="http://configure.ac" target="_blank">configure.ac</a></div></div></blockquote><div><br></div></span><div><div style="font-family:'arial narrow',sans-serif">After you modified <a href="http://configure.ac" target="_blank">configure.ac</a> did you run ./bootstrap.sh to recreate ./configure and then run ./configure? </div></div></div></div></div></blockquote><div><br></div></span><div>Oh, this is the step I didn't know. (Thank you)</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div style="font-family:'arial narrow',sans-serif"><br></div><div style="font-family:'arial narrow',sans-serif">Does ./configure report that it's finding your new dependency?</div></div></div></div></blockquote><div><br></div></span><div>For now it reports not found:</div><div><br></div><div>checking for mongoc_init in -lmongoc... no</div><div>I have selected the mongoc_init symbol by using this command:</div><div>> nm -g /usr/local/lib/<a href="http://libmongoc-1.0.so" target="_blank">libmongoc-1.0.so</a></div><span class=""><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div style="font-family:'arial narrow',sans-serif"><br></div><div style="font-family:'arial narrow',sans-serif">Does config.log show your variables being set?</div></div></div></div></blockquote><div><br></div></span><div>In config.log I found this variables related to my configuration:</div><div><br></div><div><div>MONGOC_DIR=''</div><div>MONGOC_INCLUDE=''</div><div>MONGOC_LIB=''</div><div>PBX_MONGOC='0'</div></div><span class=""><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>2. I have included in build_tools/<a href="http://menuselect-deps.in" target="_blank">menuselect-deps.in</a> the line similar to other dependencies</div><div>3. I have included in <a href="http://makeopts.in" target="_blank">makeopts.in</a> two lines one for LIB and the other for INCLUDE.</div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>4. Finally I have included in the module source code the lines with MODULEINFO</div><div><br></div><div>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.</div></div></blockquote><div><br></div></span><div><div style="font-family:'arial narrow',sans-serif">What's happening (or not happening)?</div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Thank you.</div></div><span><font color="#888888">
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></font></span></blockquote></div><br></div></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></span></div><br></div></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></div><br></div></div>