automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_ARG_ENABLE and checking for unrecognized switches


From: Eric Blake
Subject: Re: AC_ARG_ENABLE and checking for unrecognized switches
Date: Thu, 14 Mar 2019 23:27:59 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

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 <something> in --enable-
> <something>, ./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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]