[Box Backup-dev] Reviewing code -- help!
Martin Ebourne
boxbackup-dev@fluffy.co.uk
Wed, 07 Dec 2005 18:18:23 +0000
On Wed, 2005-12-07 at 16:24 +0000, Ben Summers wrote:
> >> -AX_CHECK_MOUNT_POINT(, [AC_MSG_ERROR([[cannot work out how to
> >> discover mount points on your platform]])])
> >> +AX_CHECK_MOUNT_POINT([],[])
> >>
> >> I'm not an autoconf sort of person, but that looks worrying to me?
> >> But otherwise there's only minor things.
> >
> > If you mean the fact that I disabled the fatal error - Win32 has no
> > mount points, as far as I know, so if autoconf bombs out then you
> > can't build.
>
> But doesn't that break other platforms?
Only platforms for which the mount point checking fails, essentially
Chris has removed an assert. Clearly not the right change long term, but
perfectly fine as a quick hack for him to compile on windows.
We'll need to work out how mount points do work on windows at some
point, but we can add a better autoconf workaround in the meantime.
> > If you mean the empty strings [], then I don't know. I thought it
> > looked better than entirely missing arguments. However, I don't
> > know much about Autoconf's quoting rules, perhaps someone can
> > correct me.
Makes no difference. I prefer to leave them out myself, find there's
more than enough square brackets in this M4 stuff anyway.
> > [config.guess] and [config.sub] are from Automake 1.8. They are
> > needed to guess the platform type. If we don't include them
> > ourselves then we'll have to find a way to copy them from the
> > user's automake installation, or rewrite them from scratch.
>
> If they're part of the base install, surely you don't need to include
> a copy in the project?
There should be no need to check these files in. Probably they should be
copied into place by running ./bootstrap. I'll look into fixing that.
> > [infrastructure/m4/ax_check_libs_prototype.m4] is needed to detect
> > functions on Win32. I could just make the test that calls nanosleep
> > call Sleep instead on WIN32, and remove this.
>
> Sounds sensible.
>
> > Since these are quite small blocks of code, perhaps we can apply to
> > the authors for a license exemption?
>
> I think Martin will come up with a good plan. (I hope.)
There's no problem with either of these. Although the GPL is 'viral',
people make much more out of this than they should. What the 'viral'
means is that if you link your code against GPL code and then distribute
it, you have to make your code available under the GPL too.
That does not apply here. These autoconf scripts are being used as tools
to manufacture build scripts. In addition they have what is called the
'autoconf exception', which means that any chunks of them that appear
in ./configure due to expansion by autoconf do not come under the GPL.
This puts it much more on the same footing as flex/bison, and other
tools which generate files & include boilerplate code. They are entirely
safe to use because there is no GPL violation caused by using them in
this way.
What does apply is that Chris has made modifications to the
AC_SEARCH_LIBS function. Since that is GPL (with autoconf exception),
the changes he has made to that file itself have to be released under
the GPL. As far as I can see, he's already done that by checking it in
to svn.
What is less clear is why the file is called ax_check_libs_prototype but
the function it defines is called AC_SEARCH_LIBS_PROTO!
Cheers,
Martin.