Skip to contentSkip to conversation

autoconf: change AX_ARG_{DISABLE/ENABLE}_AND_EXPORT to make more sense

PATCH Superseded Roger Pau Monne 3 participants 7 messages Feb 23, 2012 – Mar 15, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 autoconf: change AX_ARG_{DISABLE/ENABLE}_AND_EXPORT to make more sense

# HG changeset patch
# User Roger Pau Monne <[email protected]>
# Date 1329975951 -3600
# Node ID 18fea25a3f0c56cd06fb823c7d4cbc4f05397e42
# Parent 64f5cd4aa2a273d4b84c382b8ef484eab7905631
autoconf: change AX_ARG_{DISABLE/ENABLE}_AND_EXPORT to make more sense

Change disable/enable feature macros to have a more significative name of what they actually do, to avoid confusions.

New macros have the following names:

AX_ARG_DEFAULT_ENABLE: feature is enabled by default, provides the --disable-{feature} option to disable it.

AX_ARG_DEFAULT_DISABLE: feature is disabled by default, provides the --enable-{feature] option to enable it.

tools/configure +52 -31
diff -r 64f5cd4aa2a2 -r 18fea25a3f0c tools/configure
@@ -1371,7 +1371,7 @@ Optional Features:
   --disable-ocamltools    Disable Ocaml tools
   --enable-miniterm       Enable miniterm
   --enable-lomount        Enable lomount
-  --disable-debug         Disable debug build of tools
+  --disable-debug         Disable debug build of Xen and tools
 
 Some influential environment variables:
   CC          C compiler command
@@ -3805,6 +3805,9 @@ case $host_os in *\ *) host_os=`echo "$h
 
 
 
+# This function should not be called outside of this file
+
+
 
 
 
@@ -3908,27 +3911,30 @@ case $host_os in *\ *) host_os=`echo "$h
 
 
 # Enable/disable options
+
 # Check whether --enable-githttp was given.
 if test "${enable_githttp+set}" = set; then :
   enableval=$enable_githttp;
 fi
 
 
-if test "x$enable_githttp" = "xyes"; then :
+if test "x$enable_githttp" = "xno"; then :
+
+    ax_cv_githttp="n"
+
+elif test "x$enable_githttp" = "xyes"; then :
 
     ax_cv_githttp="y"
 
-elif test "x$enable_githttp" = "xno"; then :
+elif test -z $ax_cv_githttp; then :
 
     ax_cv_githttp="n"
 
-elif test -z $ax_cv_githttp; then :
-
-    ax_cv_githttp="n"
-
 fi
 githttp=$ax_cv_githttp
 
+
+
 # Check whether --enable-monitors was given.
 if test "${enable_monitors+set}" = set; then :
   enableval=$enable_monitors;
@@ -3950,48 +3956,54 @@ elif test -z $ax_cv_monitors; then :
 fi
 monitors=$ax_cv_monitors
 
+
+
 # Check whether --enable-vtpm was given.
 if test "${enable_vtpm+set}" = set; then :
   enableval=$enable_vtpm;
 fi
 
 
-if test "x$enable_vtpm" = "xyes"; then :
+if test "x$enable_vtpm" = "xno"; then :
+
+    ax_cv_vtpm="n"
+
+elif test "x$enable_vtpm" = "xyes"; then :
 
     ax_cv_vtpm="y"
 
-elif test "x$enable_vtpm" = "xno"; then :
+elif test -z $ax_cv_vtpm; then :
 
     ax_cv_vtpm="n"
 
-elif test -z $ax_cv_vtpm; then :
-
-    ax_cv_vtpm="n"
-
 fi
 vtpm=$ax_cv_vtpm
 
+
+
 # Check whether --enable-xapi was given.
 if test "${enable_xapi+set}" = set; then :
   enableval=$enable_xapi;
 fi
 
 
-if test "x$enable_xapi" = "xyes"; then :
+if test "x$enable_xapi" = "xno"; then :
+
+    ax_cv_xapi="n"
+
+elif test "x$enable_xapi" = "xyes"; then :
 
     ax_cv_xapi="y"
 
-elif test "x$enable_xapi" = "xno"; then :
+elif test -z $ax_cv_xapi; then :
 
     ax_cv_xapi="n"
 
-elif test -z $ax_cv_xapi; then :
-
-    ax_cv_xapi="n"
-
 fi
 xapi=$ax_cv_xapi
 
+
+
 # Check whether --enable-pythontools was given.
 if test "${enable_pythontools+set}" = set; then :
   enableval=$enable_pythontools;
@@ -4013,6 +4025,8 @@ elif test -z $ax_cv_pythontools; then :
 fi
 pythontools=$ax_cv_pythontools
 
+
+
 # Check whether --enable-ocamltools was given.
 if test "${enable_ocamltools+set}" = set; then :
   enableval=$enable_ocamltools;
@@ -4034,48 +4048,54 @@ elif test -z $ax_cv_ocamltools; then :
 fi
 ocamltools=$ax_cv_ocamltools
 
+
+
 # Check whether --enable-miniterm was given.
 if test "${enable_miniterm+set}" = set; then :
   enableval=$enable_miniterm;
 fi
 
 
-if test "x$enable_miniterm" = "xyes"; then :
+if test "x$enable_miniterm" = "xno"; then :
+
+    ax_cv_miniterm="n"
+
+elif test "x$enable_miniterm" = "xyes"; then :
 
     ax_cv_miniterm="y"
 
-elif test "x$enable_miniterm" = "xno"; then :
+elif test -z $ax_cv_miniterm; then :
 
     ax_cv_miniterm="n"
 
-elif test -z $ax_cv_miniterm; then :
-
-    ax_cv_miniterm="n"
-
 fi
 miniterm=$ax_cv_miniterm
 
+
+
 # Check whether --enable-lomount was given.
 if test "${enable_lomount+set}" = set; then :
   enableval=$enable_lomount;
 fi
 
 
-if test "x$enable_lomount" = "xyes"; then :
+if test "x$enable_lomount" = "xno"; then :
+
+    ax_cv_lomount="n"
+
+elif test "x$enable_lomount" = "xyes"; then :
 
     ax_cv_lomount="y"
 
-elif test "x$enable_lomount" = "xno"; then :
+elif test -z $ax_cv_lomount; then :
 
     ax_cv_lomount="n"
 
-elif test -z $ax_cv_lomount; then :
-
-    ax_cv_lomount="n"
-
 fi
 lomount=$ax_cv_lomount
 
+
+
 # Check whether --enable-debug was given.
 if test "${enable_debug+set}" = set; then :
   enableval=$enable_debug;
@@ -4103,6 +4123,7 @@ debug=$ax_cv_debug
 
 
 
+
 for cflag in $PREPEND_INCLUDES
 do
     PREPEND_CFLAGS+=" -I$cflag"
tools/configure.ac +10 -12
diff -r 64f5cd4aa2a2 -r 18fea25a3f0c tools/configure.ac
@@ -23,8 +23,7 @@ AC_USE_SYSTEM_EXTENSIONS
 AC_CANONICAL_HOST
 
 # M4 Macro includes
-m4_include([m4/enable_feature.m4])
-m4_include([m4/disable_feature.m4])
+m4_include([m4/features.m4])
 m4_include([m4/path_or_fail.m4])
 m4_include([m4/python_version.m4])
 m4_include([m4/python_devel.m4])
@@ -36,16 +35,15 @@ m4_include([m4/pkg.m4])
 m4_include([m4/curses.m4])
 
 # Enable/disable options
-AX_ARG_ENABLE_AND_EXPORT([githttp], [Download GIT repositories via HTTP])
-AX_ARG_DISABLE_AND_EXPORT([monitors],
-    [Disable xenstat and xentop monitoring tools])
-AX_ARG_ENABLE_AND_EXPORT([vtpm], [Enable Virtual Trusted Platform Module])
-AX_ARG_ENABLE_AND_EXPORT([xapi], [Enable Xen API Bindings])
-AX_ARG_DISABLE_AND_EXPORT([pythontools], [Disable Python tools])
-AX_ARG_DISABLE_AND_EXPORT([ocamltools], [Disable Ocaml tools])
-AX_ARG_ENABLE_AND_EXPORT([miniterm], [Enable miniterm])
-AX_ARG_ENABLE_AND_EXPORT([lomount], [Enable lomount])
-AX_ARG_DISABLE_AND_EXPORT([debug], [Disable debug build of tools])
+AX_ARG_DEFAULT_DISABLE([githttp], [Download GIT repositories via HTTP])
+AX_ARG_DEFAULT_ENABLE([monitors], [Disable xenstat and xentop monitoring tools])
+AX_ARG_DEFAULT_DISABLE([vtpm], [Enable Virtual Trusted Platform Module])
+AX_ARG_DEFAULT_DISABLE([xapi], [Enable Xen API Bindings])
+AX_ARG_DEFAULT_ENABLE([pythontools], [Disable Python tools])
+AX_ARG_DEFAULT_ENABLE([ocamltools], [Disable Ocaml tools])
+AX_ARG_DEFAULT_DISABLE([miniterm], [Enable miniterm])
+AX_ARG_DEFAULT_DISABLE([lomount], [Enable lomount])
+AX_ARG_DEFAULT_ENABLE([debug], [Disable debug build of Xen and tools])
 
 AC_ARG_VAR([PREPEND_INCLUDES],
     [List of include folders to prepend to CFLAGS (without -I)])
tools/m4/disable_feature.m4 deleted +0 -13
diff -r 64f5cd4aa2a2 -r 18fea25a3f0c tools/m4/disable_feature.m4
@@ -1,13 +0,0 @@
-AC_DEFUN([AX_ARG_DISABLE_AND_EXPORT],
-[AC_ARG_ENABLE([$1],
-    AS_HELP_STRING([--disable-$1], [$2]))
-
-AS_IF([test "x$enable_$1" = "xno"], [
-    ax_cv_$1="n"
-], [test "x$enable_$1" = "xyes"], [
-    ax_cv_$1="y"
-], [test -z $ax_cv_$1], [
-    ax_cv_$1="y"
-])
-$1=$ax_cv_$1
-AC_SUBST($1)])
tools/m4/enable_feature.m4 deleted +0 -13
diff -r 64f5cd4aa2a2 -r 18fea25a3f0c tools/m4/enable_feature.m4
@@ -1,13 +0,0 @@
-AC_DEFUN([AX_ARG_ENABLE_AND_EXPORT],
-[AC_ARG_ENABLE([$1],
-    AS_HELP_STRING([--enable-$1], [$2]))
-
-AS_IF([test "x$enable_$1" = "xyes"], [
-    ax_cv_$1="y"
-], [test "x$enable_$1" = "xno"], [
-    ax_cv_$1="n"
-], [test -z $ax_cv_$1], [
-    ax_cv_$1="n"
-])
-$1=$ax_cv_$1
-AC_SUBST($1)])
tools/m4/features.m4 new file +21 -0
diff -r 64f5cd4aa2a2 -r 18fea25a3f0c tools/m4/features.m4
@@ -0,0 +1,21 @@
+AC_DEFUN([AX_ARG_DEFAULT_ENABLE], [
+AC_ARG_ENABLE([$1], AS_HELP_STRING([--disable-$1], [$2]))
+AX_PARSE_VALUE([$1], [y])
+])
+
+AC_DEFUN([AX_ARG_DEFAULT_DISABLE], [
+AC_ARG_ENABLE([$1], AS_HELP_STRING([--enable-$1], [$2]))
+AX_PARSE_VALUE([$1], [n])
+])
+
+# This function should not be called outside of this file
+AC_DEFUN([AX_PARSE_VALUE], [
+AS_IF([test "x$enable_$1" = "xno"], [
+    ax_cv_$1="n"
+], [test "x$enable_$1" = "xyes"], [
+    ax_cv_$1="y"
+], [test -z $ax_cv_$1], [
+    ax_cv_$1="$2"
+])
+$1=$ax_cv_$1
+AC_SUBST($1)])
Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines · Roger Pau Monne

# HG changeset patch
# User Roger Pau Monne <[email protected]>
# Date 1329975951 -3600
# Node ID 18fea25a3f0c56cd06fb823c7d4cbc4f05397e42
# Parent 64f5cd4aa2a273d4b84c382b8ef484eab7905631
autoconf: change AX_ARG_{DISABLE/ENABLE}_AND_EXPORT to make more sense

Change disable/enable feature macros to have a more significative name of what they actually do, to avoid confusions.

New macros have the following names:

Quoted 7 lines

AX_ARG_DEFAULT_ENABLE: feature is enabled by default, provides the --disable-{feature} option to disable it.

AX_ARG_DEFAULT_DISABLE: feature is disabled by default, provides the --enable-{feature] option to enable it.

Quoted 14 lines

diff -r 64f5cd4aa2a2 -r 18fea25a3f0c tools/configure

tools/configure +1 -1
@@ -1371,7 +1371,7 @@ Optional Features:
   --disable-ocamltools    Disable Ocaml tools
   --enable-miniterm       Enable miniterm
   --enable-lomount        Enable lomount
-  --disable-debug         Disable debug build of tools
+  --disable-debug         Disable debug build of Xen and tools
 
 Some influential environment variables:
   CC          C compiler command

tools/configure case $host_os in *\ *) host_os=`echo "$h · line 3810

Quoted 6 lines
tools/configure +3 -0
@@ -3805,6 +3805,9 @@ case $host_os in *\ *) host_os=`echo "$h
 
 
 
+# This function should not be called outside of this file
+
+

I think you need "dnl This function..." in the m4 source instead of "# This function..." to avoid this spurious comment in the output.

Quoted 23 lines

[...]

diff -r 64f5cd4aa2a2 -r 18fea25a3f0c tools/configure.ac

tools/configure.ac +1 -6
@@ -23,8 +23,7 @@ AC_USE_SYSTEM_EXTENSIONS
 AC_CANONICAL_HOST
 
 # M4 Macro includes
-m4_include([m4/enable_feature.m4])
-m4_include([m4/disable_feature.m4])
+m4_include([m4/features.m4])
 m4_include([m4/path_or_fail.m4])
 m4_include([m4/python_version.m4])
 m4_include([m4/python_devel.m4])
@@ -36,16 +35,15 @@ m4_include([m4/pkg.m4])
 m4_include([m4/curses.m4])
 
 # Enable/disable options
-AX_ARG_ENABLE_AND_EXPORT([githttp], [Download GIT repositories via HTTP])
-AX_ARG_DISABLE_AND_EXPORT([monitors],
-    [Disable xenstat and xentop monitoring tools])
-AX_ARG_ENABLE_AND_EXPORT([vtpm], [Enable Virtual Trusted Platform Module])

tools/configure.ac m4_include([m4/pkg.m4]) · line 41

Quoted 10 lines
tools/configure.ac +4 -6
-AX_ARG_ENABLE_AND_EXPORT([xapi], [Enable Xen API Bindings])
-AX_ARG_DISABLE_AND_EXPORT([pythontools], [Disable Python tools])
-AX_ARG_DISABLE_AND_EXPORT([ocamltools], [Disable Ocaml tools])
-AX_ARG_ENABLE_AND_EXPORT([miniterm], [Enable miniterm])
-AX_ARG_ENABLE_AND_EXPORT([lomount], [Enable lomount])
-AX_ARG_DISABLE_AND_EXPORT([debug], [Disable debug build of tools])
+AX_ARG_DEFAULT_DISABLE([githttp], [Download GIT repositories via HTTP])
+AX_ARG_DEFAULT_ENABLE([monitors], [Disable xenstat and xentop monitoring tools])
+AX_ARG_DEFAULT_DISABLE([vtpm], [Enable Virtual Trusted Platform Module])
+AX_ARG_DEFAULT_DISABLE([xapi], [Enable Xen API Bindings])

Perhaps call this one "xenapi" or "xenapi-bindings" or something so it is not confused with "xapi" the toolstack (which implements a much newer and incompatible Xen API)

tools/configure.ac m4_include([m4/pkg.m4]) · line 49

Quoted 8 lines
tools/configure.ac +5 -0
+AX_ARG_DEFAULT_ENABLE([pythontools], [Disable Python tools])
+AX_ARG_DEFAULT_ENABLE([ocamltools], [Disable Ocaml tools])
+AX_ARG_DEFAULT_DISABLE([miniterm], [Enable miniterm])
+AX_ARG_DEFAULT_DISABLE([lomount], [Enable lomount])
+AX_ARG_DEFAULT_ENABLE([debug], [Disable debug build of Xen and tools])
 
 AC_ARG_VAR([PREPEND_INCLUDES],
     [List of include folders to prepend to CFLAGS (without -I)])

Ian.

#2 lore raw

2012/3/15 Ian Campbell <[email protected]>:

Quoted 40 lines · Roger Pau Monne
Quoted 12 lines

# HG changeset patch
# User Roger Pau Monne <[email protected]>
# Date 1329975951 -3600
# Node ID 18fea25a3f0c56cd06fb823c7d4cbc4f05397e42
# Parent  64f5cd4aa2a273d4b84c382b8ef484eab7905631
autoconf: change AX_ARG_{DISABLE/ENABLE}_AND_EXPORT to make more sense

Change disable/enable feature macros to have a more significative name of what they actually do, to avoid confusions.

New macros have the following names:

Quoted 7 lines

AX_ARG_DEFAULT_ENABLE: feature is enabled by default, provides the --disable-{feature} option to disable it.

AX_ARG_DEFAULT_DISABLE: feature is disabled by default, provides the --enable-{feature] option to enable it.

Quoted 17 lines

diff -r 64f5cd4aa2a2 -r 18fea25a3f0c tools/configure

tools/configure Thu Feb 23 06:45:51 2012 +0100 renamed from tools/configure Tue Mar 13 17:30:50 2012 +0000 +0 -0
@@ -1371,7 +1371,7 @@ Optional Features:

   --disable-ocamltools    Disable Ocaml tools --enable-miniterm       Enable miniterm --enable-lomount        Enable lomount
-  --disable-debug         Disable debug build of tools
+  --disable-debug         Disable debug build of Xen and tools

 Some influential environment variables:
   CC          C compiler command

tools/configure Thu Feb 23 06:45:51 2012 +0100 renamed from tools/configure Tue Mar 13 17:30:50 2012 +0000 +0 -0
@@ -3805,6 +3805,9 @@ case $host_os in *\ *) host_os=`echo "$h
 
 
 
Quoted 6 lines

tools/configure Thu Feb 23 06:45:51 2012 +0100 case $host_os in *\ *) host_os=`echo "$h · line 3810

Quoted 3 lines
tools/configure Thu Feb 23 06:45:51 2012 +0100 renamed from tools/configure Tue Mar 13 17:30:50 2012 +0000 +3 -0
+# This function should not be called outside of this file
+
+

I think you need "dnl This function..." in the m4 source instead of "# This function..." to avoid this spurious comment in the output.

Done.

Quoted 30 lines
Quoted 30 lines

[...]

diff -r 64f5cd4aa2a2 -r 18fea25a3f0c tools/configure.ac

tools/configure.ac      Thu Feb 23 06:45:51 2012 +0100 renamed from tools/configure.ac      Tue Mar 13 17:30:50 2012 +0000 +0 -0
@@ -23,8 +23,7 @@ AC_USE_SYSTEM_EXTENSIONS

 AC_CANONICAL_HOST

 # M4 Macro includes

tools/configure.ac      Thu Feb 23 06:45:51 2012 +0100 renamed from tools/configure.ac      Tue Mar 13 17:30:50 2012 +0000 +1 -2
-m4_include([m4/enable_feature.m4])
-m4_include([m4/disable_feature.m4])
+m4_include([m4/features.m4])

 m4_include([m4/path_or_fail.m4])
 m4_include([m4/python_version.m4])
 m4_include([m4/python_devel.m4])

tools/configure.ac      Thu Feb 23 06:45:51 2012 +0100 renamed from tools/configure.ac      Tue Mar 13 17:30:50 2012 +0000 +0 -10
@@ -36,16 +35,15 @@ m4_include([m4/pkg.m4])
  m4_include([m4/curses.m4])
 
  # Enable/disable options
-AX_ARG_ENABLE_AND_EXPORT([githttp], [Download GIT repositories via HTTP])
-AX_ARG_DISABLE_AND_EXPORT([monitors],
-    [Disable xenstat and xentop monitoring tools])
-AX_ARG_ENABLE_AND_EXPORT([vtpm], [Enable Virtual Trusted Platform Module])
-AX_ARG_ENABLE_AND_EXPORT([xapi], [Enable Xen API Bindings])
-AX_ARG_DISABLE_AND_EXPORT([pythontools], [Disable Python tools])
-AX_ARG_DISABLE_AND_EXPORT([ocamltools], [Disable Ocaml tools])
-AX_ARG_ENABLE_AND_EXPORT([miniterm], [Enable miniterm])
-AX_ARG_ENABLE_AND_EXPORT([lomount], [Enable lomount])
-AX_ARG_DISABLE_AND_EXPORT([debug], [Disable debug build of tools])
Quoted 8 lines

tools/configure.ac      Thu Feb 23 06:45:51 2012 +0100 m4_include([m4/pkg.m4]) · line 41

Quoted 4 lines
tools/configure.ac      Thu Feb 23 06:45:51 2012 +0100 renamed from tools/configure.ac      Tue Mar 13 17:30:50 2012 +0000 +4 -0
+AX_ARG_DEFAULT_DISABLE([githttp], [Download GIT repositories via HTTP])
+AX_ARG_DEFAULT_ENABLE([monitors], [Disable xenstat and xentop monitoring tools])
+AX_ARG_DEFAULT_DISABLE([vtpm], [Enable Virtual Trusted Platform Module])
+AX_ARG_DEFAULT_DISABLE([xapi], [Enable Xen API Bindings])

Perhaps call this one "xenapi" or "xenapi-bindings" or something so it is not confused with "xapi" the toolstack (which implements a much newer and incompatible Xen API)

I've renamed it to xenapi, because I think xenapi-bindings is too long, but if you think it is still misleading we can change it.

Quoted 6 lines
Quoted 6 lines
tools/configure.ac      Thu Feb 23 06:45:51 2012 +0100 renamed from tools/configure.ac      Tue Mar 13 17:30:50 2012 +0000 +5 -0
+AX_ARG_DEFAULT_ENABLE([pythontools], [Disable Python tools])
+AX_ARG_DEFAULT_ENABLE([ocamltools], [Disable Ocaml tools])
+AX_ARG_DEFAULT_DISABLE([miniterm], [Enable miniterm])
+AX_ARG_DEFAULT_DISABLE([lomount], [Enable lomount])
+AX_ARG_DEFAULT_ENABLE([debug], [Disable debug build of Xen and tools])
 
Quoted 6 lines

tools/configure.ac      Thu Feb 23 06:45:51 2012 +0100 m4_include([m4/pkg.m4]) · line 49

Quoted 2 lines
tools/configure.ac      Thu Feb 23 06:45:51 2012 +0100 renamed from tools/configure.ac      Tue Mar 13 17:30:50 2012 +0000 +0 -0
  AC_ARG_VAR([PREPEND_INCLUDES],
      [List of include folders to prepend to CFLAGS (without -I)])

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#3 lore raw
In reply to Roger Pau Monne

tools/configure Optional Features: · line 1374

Quoted 9 lines · Roger Pau Monne

diff -r 64f5cd4aa2a2 -r 18fea25a3f0c tools/configure

tools/configure +1 -1
@@ -1371,7 +1371,7 @@ Optional Features:
   --disable-ocamltools    Disable Ocaml tools
   --enable-miniterm       Enable miniterm
   --enable-lomount        Enable lomount
-  --disable-debug         Disable debug build of tools
+  --disable-debug         Disable debug build of Xen and tools

This was what actually confused me. I expected to see what the default is in the 'configure --help' output because I think thats what I have seen in the past from other projects. But I have to double check wether other projects really do it that way or if I just interpreted it that way.

Olaf

#4 lore raw

2012/3/15 Olaf Hering <[email protected]>:

Quoted 17 lines · Roger Pau Monne
Quoted 10 lines

diff -r 64f5cd4aa2a2 -r 18fea25a3f0c tools/configure

tools/configure Thu Feb 23 06:45:51 2012 +0100 renamed from tools/configure Tue Mar 13 17:30:50 2012 +0000 +0 -0
@@ -1371,7 +1371,7 @@ Optional Features:

   --disable-ocamltools    Disable Ocaml tools --enable-miniterm       Enable miniterm --enable-lomount        Enable lomount
-  --disable-debug         Disable debug build of tools
+  --disable-debug         Disable debug build of Xen and tools

This was what actually confused me. I expected to see what the default is in the 'configure --help' output because I think thats what I have seen in the past from other projects. But I have to double check wether other projects really do it that way or if I just interpreted it that way.

What we could actually do is provide both options, something like:

--disable-debug disable debug build of tools
--enable-debug enable debug build of tools (default)

What do you think about this?

Quoted 7 lines

Olaf

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#5 lore raw
Quoted 19 lines · Roger Pau Monné

2012/3/15 Olaf Hering <[email protected]>:

Quoted 17 lines · Roger Pau Monne

tools/configure Thu Feb 23 06:45:51 2012 +0100 Optional Features: · line 1374

Quoted 10 lines

diff -r 64f5cd4aa2a2 -r 18fea25a3f0c tools/configure

tools/configure Thu Feb 23 06:45:51 2012 +0100 renamed from tools/configure Tue Mar 13 17:30:50 2012 +0000 +1 -1
@@ -1371,7 +1371,7 @@ Optional Features:
   --disable-ocamltools    Disable Ocaml tools
   --enable-miniterm       Enable miniterm
   --enable-lomount        Enable lomount
-  --disable-debug         Disable debug build of tools
+  --disable-debug         Disable debug build of Xen and tools

This was what actually confused me. I expected to see what the default is in the 'configure --help' output because I think thats what I have seen in the past from other projects. But I have to double check wether other projects really do it that way or if I just interpreted it that way.

Quoted 6 lines

What we could actually do is provide both options, something like:

--disable-debug disable debug build of tools
--enable-debug enable debug build of tools (default)

What do you think about this?

We should do whatever everyone else does or follow whatever guidelines autoconf make.

http://www.delorie.com/gnu/docs/autoconf/autoconf_132.html seems to suggest that
--disable-deb disable debug build (default is YES)
is the way to go.

http://www.flameeyes.eu/autotools-mythbuster/autoconf/arguments.html
appears to concur that you provide the help text for the option which is the opposite of the default (which makes sense to me). I don't know how authoritative that doc is though.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#6 lore raw

2012/3/15 Ian Campbell <[email protected]>:

Quoted 36 lines · Roger Pau Monné
Quoted 19 lines

2012/3/15 Olaf Hering <[email protected]>:

Quoted 17 lines · Roger Pau Monne
Quoted 10 lines

diff -r 64f5cd4aa2a2 -r 18fea25a3f0c tools/configure

tools/configure Thu Feb 23 06:45:51 2012 +0100 renamed from tools/configure Tue Mar 13 17:30:50 2012 +0000 +0 -0
@@ -1371,7 +1371,7 @@ Optional Features:

   --disable-ocamltools    Disable Ocaml tools --enable-miniterm       Enable miniterm --enable-lomount        Enable lomount
-  --disable-debug         Disable debug build of tools
+  --disable-debug         Disable debug build of Xen and tools

This was what actually confused me. I expected to see what the default is in the 'configure --help' output because I think thats what I have seen in the past from other projects. But I have to double check wether other projects really do it that way or if I just interpreted it that way.

Quoted 6 lines

What we could actually do is provide both options, something like:

--disable-debug         disable debug build of tools --enable-debug          enable debug build of tools (default)

What do you think about this?

We should do whatever everyone else does or follow whatever guidelines autoconf make.

http://www.delorie.com/gnu/docs/autoconf/autoconf_132.html seems to suggest that
       --disable-deb    disable debug build (default is YES) is the way to go.

Quoted 4 lines

http://www.flameeyes.eu/autotools-mythbuster/autoconf/arguments.html
appears to concur that you provide the help text for the option which is the opposite of the default (which makes sense to me). I don't know how authoritative that doc is though.

I've followed flameeyes guide, but I've realized that qemu provided both options --enable-x and --disable-x. I'm going to add the (default is X) to the help text, and I think that should be fine.

Quoted 3 lines

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel