talloc linking / include magic

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Harald Welte laforge at gnumonks.org
Fri May 6 12:41:37 UTC 2011


Hi Sylvain,

On Fri, May 06, 2011 at 02:16:54PM +0200, Sylvain Munaut wrote:
> > The only big question is how to deal with header files, as we do
> >        #include <osmocom/core/talloc.h>
> > and in case of the system-wide libtalloc it should instead be
> >        #include <talloc.h>
> >
> > I don't really have a good idea how to handle this. Any ideas?
> 
> We could just have our local talloc have a .pc that includes a
> -I${PREFIX_STUFF}/osmocom/core/ in the cflags. So that the app always
> does a #include <talloc.h>
> Then with autotools we can just check if either talloc.pc or
> osmotalloc.pc is present (in this order) and add the appropriate
> CFLAGS to the build.

ok, good idea, makes sense.

> Alternatively, if during libosmocore compile, we detect global talloc
> is present, we don't build talloc.c and we have talloc.h be a simple
> #include <talloc.h> compatibility ?

I think it shouldn't be a compile-time decision of libosmocore, but a
compile-time decision of the application.  Especially in the future case
of a distribution-supplied libosmocore that may happen at different
times.

Regards,
	Harald
-- 
- Harald Welte <laforge at gnumonks.org>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)




More information about the OpenBSC mailing list