Re: AC_ARG_ENABLE and checking for unrecognized switches

2019-03-14 Thread Kip Warner
On Thu, 2019-03-14 at 23:27 -0500, Eric Blake wrote:
> Unfortunately, since it is by design that unknown --enable arguments
> are ignored, I don't know of a handy way to switch that behavior to
> warn or fail instead.

Thanks anyways Eric.

-- 
Kip Warner | Senior Software Engineer
OpenPGP signed/encrypted mail preferred
https://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part


Re: AC_ARG_ENABLE and checking for unrecognized switches

2019-03-14 Thread Eric Blake
On 3/14/19 10:56 PM, Kip Warner wrote:
> Hey list,
> 
> I use AC_ARG_ENABLE to create a number of different --enable switches.
> I noticed when I accidentally mistyped the  in --enable-
> , ./configure didn't bail on the unrecognized switch.

This is by design; the GNU Coding Standards wants projects to be
aggregatable, such that someone else could write a larger project that
uses yours as a subdirectory, and takes additional --enable switches
that some (but not all) of its subprojects understand.  Being able to
blindly pass down all of its switches to subprojects, without having to
worry about which projects care about which switches, makes this easier.

> 
> Is there something I need to add to configure.ac in order to get it to
> do this?

Unfortunately, since it is by design that unknown --enable arguments are
ignored, I don't know of a handy way to switch that behavior to warn or
fail instead.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.   +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



signature.asc
Description: OpenPGP digital signature


AC_ARG_ENABLE and checking for unrecognized switches

2019-03-14 Thread Kip Warner
Hey list,

I use AC_ARG_ENABLE to create a number of different --enable switches.
I noticed when I accidentally mistyped the  in --enable-
, ./configure didn't bail on the unrecognized switch.

Is there something I need to add to configure.ac in order to get it to
do this?

-- 
Kip Warner | Senior Software Engineer
OpenPGP signed/encrypted mail preferred
https://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part