[Box Backup-dev] [OT] Autoconf nesting

Martin Ebourne boxbackup-dev at fluffy.co.uk
Thu Dec 15 17:57:23 GMT 2005


Chris Wilson <chris at qwirx.com> wrote:
> Does anyone have any experience of building an autoconfiscated 
> project with another one inside it? Can you point me to relevant 
> useful resources?

The autotools book is good:

http://sources.redhat.com/autobook/autobook/autobook_toc.html

Doesn't directly cover what you're doing, but does cover similar stuff.

Also the info pages as well.

> I'm having issues with Boxi, which includes Box Backup as a 
> sub-project, now that BB is autoconfiscated. In particular, BB's 
> config.h conflicts with my own (redefining PACKAGE_NAME, etc).

I'll rename the config.h to contain 'box'. That one has annoyed me 
before elsewhere.

As to the defines, I'm not sure if there's a way of renaming those. 
I'll check later.

In one of my projects I have this hack in the common.hpp file which is 
what includes config.h:

// Remove config defines which should never have escaped log4cxx headers
#include <log4cxx/logger.h>
#undef PACKAGE
#undef PACKAGE_BUGREPORT
#undef PACKAGE_NAME
#undef PACKAGE_STRING
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
#undef VERSION

Horrid though. Need to come up with a better fix, there must be one out there.

> I'm not able to use all the libraries that BB detected for itself 
> (which I need for linking).

That's a problem with static libraries. It would be nice to make some 
kind of shared library for box at some point. That would contain 
dependencies itself on other libraries so it would just work. However, 
this is a post 0.10 task since we all want a release asap.

For now, including chunks from box configure would make sense.

> I'm thinking it would be nice, if possible, to include most (but not 
> all) of BB's configure.ac in Boxi's configure.in file, but I don't 
> know how feasible that is, or whether it creates other subtle traps. 
> I can't include the whole thing because Boxi and BB both call AC_INIT.

Should be entirely feasible. Just pick the bits you need and include 
the infrastructure/m4 directory from box into your configure.ac.

Cheers,

Martin.



More information about the Boxbackup-dev mailing list