On Sun, Mar 6, 2016 at 2:43 PM, Catalin Stanciu <[email protected]> wrote:
> Thank you, George. > > On Sun, Mar 6, 2016 at 10:08 PM, George Joseph < > [email protected]> wrote: > >> >> >> On Sun, Mar 6, 2016 at 1:56 PM, Catalin Stanciu <[email protected]> >> 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. > Ah, OK. You want to use AST_PKG_CONFIG_CHECK instead of AST_EXT_LIB_CHECK because AST_EXT_LIB_CHECK requires that you already know cflags and libs. Here's what works for me using the mongodb distribution for RedHat systems. AST_EXT_LIB_SETUP([MONGODB], [MongoDB], [mongodb]) ... AST_PKG_CONFIG_CHECK([MONGODB], [libmongo-client]) and in config.log I get... MONGODB_CFLAGS='-I/usr/include/mongo-client -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include ' MONGODB_DIR='' MONGODB_INCLUDE='-I/usr/include/mongo-client -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include ' MONGODB_LIB='-lmongo-client ' MONGODB_LIBS='-lmongo-client ' >> >>> >>> 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 >> > > > -- > _____________________________________________________________________ > -- 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
