[asterisk-dev] Question (and offer) re autotools (autoconf/automake)

Jeffrey C. Ollie jeff at ocjtech.us
Tue Feb 14 12:48:31 MST 2006


On Tue, 2006-02-14 at 10:22 -0800, Luigi Rizzo wrote:
> On Tue, Feb 14, 2006 at 10:05:24AM -0700, Charl Coetzee wrote:
> > I am wondering if there are any particular opinions out there arguing 
> > *against* using autotools for building Asterisk.  Any compelling reasons 
> ...
> 
> speaking for myself, i suppose the reason is the lack of competence.
> using the auto*tools is difficult, and coming up with something that
> works only on one platform or two and randomly breaks every time you
> add a line or two is worse than not using them.

I wouldn't call it "lack of competence" - I would say the reason is that
people want to "stick with something familiar".  The last part of your
statement could apply to the current Makefile system as well.

> Just as a data point (and hope noone gets offended, as i myself am
> completely ignorant on the autotools and couldn't do any better)
> the following is the original configure.ac from openpbx available
> at svn://svn.openpbx.org/openpbx/trunk
> 
> 	> wc configure.ac
> 	    1962    4213   68234 configure.ac
> 
> i hope eveybody realizes that if a manually generated
> template reaches 2k lines, there must be something wrong
> in the way it has been generated.

I wouldn't call it "wrong", but I would agree that it could be "better".
When I was writing that code for OpenPBX.org, one of my goals was to be
able to enable/disable the compilation of any module.  That resulted in
a lot of boilerplate code.  I'm sure that there's a better way.

> Oh, last i tried it did not produce a working configure
> for freebsd, and despite my numerous requests on their
> lists, nobody came up with suggestions to fix it
> (by "fix" i mean trim it to a reasonable size.

With the smaller community around OpenPBX.org it can be tough to solve
problems like these where the main developers don't use your particular
platform.

> Unlike other stuff, Asterisk/openpbx
> are indeed using very few external libraries/toolkits/etc
> so i would expect the compatibility checks to be limited,
> resulting in a reasonably small configure.ac)

Even though Asterisk has tried to minimize the number of 3rd party
library dependencies, I count around at least 15-20 external libraries
that need to be linked against if you want to compile most of the
modules in the Asterisk source code.  Plus, Asterisk makes intensive use
of "standard" libraries like glibc or the posix threading library that
require probing to check for platform differences there.

> > We're corporately considering "translating" the current Asterisk 
> > makefiles to autotools, and  contributing this back to the community. 
> > (In fact I already have tacit approval for this).
> 
> once again speaking for myself, usually these things are judged by the result.
> I suspect that if you come out with a reasonably small config that works
> on multiple platforms and is readable and maintainable, people
> may accept or use it. If, on the other hand, it's 2k lines of
> m4 macros, well...

With Asterisk/autoconf, it's been kind of a chicken and egg problem.  No
one has wanted to spend the time writing autoconf files for Asterisk
because of comments like this.  And until someone takes the time to
write some autoconf files it's hard to convince people like you that
it's worth it.

Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20060214/6d1c877f/attachment.pgp


More information about the asterisk-dev mailing list