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/.

Sylvain Munaut 246tnt at gmail.com
Fri May 6 12:16:54 UTC 2011


> 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.

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 ?


Cheers,

    Sylvain




More information about the OpenBSC mailing list