Re: [PATCH] Have configure complain about unknown options - Mailing list pgsql-patches

From Martijn van Oosterhout
Subject Re: [PATCH] Have configure complain about unknown options
Date
Msg-id 20060505113946.GB23972@svana.org
Whole thread Raw
In response to Re: [PATCH] Have configure complain about unknown options  ("Marko Kreen" <markokr@gmail.com>)
List pgsql-patches
On Fri, May 05, 2006 at 02:22:25PM +0300, Marko Kreen wrote:
> AFAIK that 'feature' is there to support configuring a 'tree'
> of projects (like gcc), where subprojects have their own configure
> scripts with different options.  That way you can give all options
> to top-level configure script which passes them to other scripts and
> each picks only whats needed.  In such setting all scripts need to
> ignore unknown options.

I was wondering about that. I think it's also because there are
possibly a number of tools working together (autoheader/automake/etc)
and autoconf is not in the position to know all possible options.
You're not required to declare all the options you understand in
configure.in because they may be used elsewhere.

> As PostgreSQL tree is not set up that way, I think for clarity sake
> it would be better to give explicit errors for unknown options.

Someone in the past has gone to some effort to create a bunch of macros
for postgres that declares all the options our configure script
understands and simultaneously create help for them (this is also why
the patch is so small, the hard work of identifying the options was
done long ago). So we are in a position to know what is allowed and
what isn't.

One thing I've noticed so far is that the Debian package scripts use
--enable-maintainer-mode. No idea why, that affects automake, which we
don't use. It is however an excellent example of why complaining about
unknown options can't be done in the general case.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-patches by date:

Previous
From: "Marko Kreen"
Date:
Subject: Re: [PATCH] Have configure complain about unknown options
Next
From: Bruce Momjian
Date:
Subject: Re: [BUGS] BUG #2401: spinlocks not available on amd64