diff mbox

configure: add missing --disable-modules option

Message ID 1446473183-24250-1-git-send-email-stefanha@redhat.com
State New
Headers show

Commit Message

Stefan Hajnoczi Nov. 2, 2015, 2:06 p.m. UTC
According to ./configure all options should have both --enable-foo and
--disable-foo:

  # Always add --enable-foo and --disable-foo command line args.
  # Distributions want to ensure that several features are compiled in, and it
  # is impossible without a --enable-foo that exits if a feature is not found.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 configure | 3 +++
 1 file changed, 3 insertions(+)

Comments

Fam Zheng Nov. 3, 2015, 12:24 a.m. UTC | #1
On Mon, 11/02 14:06, Stefan Hajnoczi wrote:
> According to ./configure all options should have both --enable-foo and
> --disable-foo:
> 
>   # Always add --enable-foo and --disable-foo command line args.
>   # Distributions want to ensure that several features are compiled in, and it
>   # is impossible without a --enable-foo that exits if a feature is not found.

Actually the document is wrong about module support, the default is off:

> Optional features, enabled with --enable-FEATURE and
> disabled with --disable-FEATURE, default is enabled if available:

Maybe we should move it out of this section instead?

What about vnc-tls? It's described in the same place, but there is no option
for it.

Fam
Stefan Hajnoczi Nov. 3, 2015, 11:22 a.m. UTC | #2
On Tue, Nov 03, 2015 at 08:24:47AM +0800, Fam Zheng wrote:
> On Mon, 11/02 14:06, Stefan Hajnoczi wrote:
> Actually the document is wrong about module support, the default is off:

These issues are independent of this patch, but...

> > Optional features, enabled with --enable-FEATURE and
> > disabled with --disable-FEATURE, default is enabled if available:
> 
> Maybe we should move it out of this section instead?

There are other foo="no" default options in this section.

I think "default is enabled if available" really refers to foo=""
autodetection only.

> What about vnc-tls? It's described in the same place, but there is no option
> for it.

Regarding vnc-tls, it was removed in
3e305e4a4752f70c0b5c3cf5b43ec957881714f7.  Maybe Dan can send a
follow-up patch that removes it from the ./configure --help output?
Daniel P. Berrangé Nov. 3, 2015, 11:31 a.m. UTC | #3
On Tue, Nov 03, 2015 at 11:22:13AM +0000, Stefan Hajnoczi wrote:
> On Tue, Nov 03, 2015 at 08:24:47AM +0800, Fam Zheng wrote:
> > On Mon, 11/02 14:06, Stefan Hajnoczi wrote:
> > Actually the document is wrong about module support, the default is off:
> 
> These issues are independent of this patch, but...
> 
> > > Optional features, enabled with --enable-FEATURE and
> > > disabled with --disable-FEATURE, default is enabled if available:
> > 
> > Maybe we should move it out of this section instead?
> 
> There are other foo="no" default options in this section.
> 
> I think "default is enabled if available" really refers to foo=""
> autodetection only.
> 
> > What about vnc-tls? It's described in the same place, but there is no option
> > for it.
> 
> Regarding vnc-tls, it was removed in
> 3e305e4a4752f70c0b5c3cf5b43ec957881714f7.  Maybe Dan can send a
> follow-up patch that removes it from the ./configure --help output?

Sure, will do.


Regards,
Daniel
Peter Maydell Nov. 3, 2015, 11:56 a.m. UTC | #4
On 3 November 2015 at 11:22, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> On Tue, Nov 03, 2015 at 08:24:47AM +0800, Fam Zheng wrote:
>> On Mon, 11/02 14:06, Stefan Hajnoczi wrote:
>> Actually the document is wrong about module support, the default is off:
>
> These issues are independent of this patch, but...
>
>> > Optional features, enabled with --enable-FEATURE and
>> > disabled with --disable-FEATURE, default is enabled if available:
>>
>> Maybe we should move it out of this section instead?
>
> There are other foo="no" default options in this section.
>
> I think "default is enabled if available" really refers to foo=""
> autodetection only.

I think what it ought to say is something like

"Optional features: these can be enabled with --enable-FEATURE
or disabled with --disable-FEATURE. The default (unless otherwise
specified below) is to autodetect support for the feature, and
enable it if possible, and disable it if not."

Then options in the list which don't default to 'autodetect'
should say so, like 'debug-tcg' does now.

thanks
-- PMM
Fam Zheng Nov. 4, 2015, 12:47 a.m. UTC | #5
On Tue, 11/03 11:56, Peter Maydell wrote:
> On 3 November 2015 at 11:22, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> > On Tue, Nov 03, 2015 at 08:24:47AM +0800, Fam Zheng wrote:
> >> On Mon, 11/02 14:06, Stefan Hajnoczi wrote:
> >> Actually the document is wrong about module support, the default is off:
> >
> > These issues are independent of this patch, but...
> >
> >> > Optional features, enabled with --enable-FEATURE and
> >> > disabled with --disable-FEATURE, default is enabled if available:
> >>
> >> Maybe we should move it out of this section instead?
> >
> > There are other foo="no" default options in this section.
> >
> > I think "default is enabled if available" really refers to foo=""
> > autodetection only.
> 
> I think what it ought to say is something like
> 
> "Optional features: these can be enabled with --enable-FEATURE
> or disabled with --disable-FEATURE. The default (unless otherwise
> specified below) is to autodetect support for the feature, and
> enable it if possible, and disable it if not."
> 
> Then options in the list which don't default to 'autodetect'
> should say so, like 'debug-tcg' does now.

Sounds good to me. For this patch:

Reviewed-by: Fam Zheng <famz@redhat.com>
Peter Maydell Nov. 6, 2015, 11:31 a.m. UTC | #6
On 2 November 2015 at 14:06, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> According to ./configure all options should have both --enable-foo and
> --disable-foo:
>
>   # Always add --enable-foo and --disable-foo command line args.
>   # Distributions want to ensure that several features are compiled in, and it
>   # is impossible without a --enable-foo that exits if a feature is not found.
>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  configure | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/configure b/configure
> index 7a1d08d..75b4fa5 100755
> --- a/configure
> +++ b/configure
> @@ -787,6 +787,9 @@ for opt do
>    --enable-modules)
>        modules="yes"
>    ;;
> +  --disable-modules)
> +      modules="no"
> +  ;;
>    --cpu=*)
>    ;;
>    --target-list=*) target_list="$optarg"
> --
> 2.4.3

Applied to master, thanks.

-- PMM
diff mbox

Patch

diff --git a/configure b/configure
index 7a1d08d..75b4fa5 100755
--- a/configure
+++ b/configure
@@ -787,6 +787,9 @@  for opt do
   --enable-modules)
       modules="yes"
   ;;
+  --disable-modules)
+      modules="no"
+  ;;
   --cpu=*)
   ;;
   --target-list=*) target_list="$optarg"