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