diff options
author | Dan Nicholson <dbn.lists@gmail.com> | 2010-10-09 17:41:10 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-10-28 23:23:40 -0700 |
commit | 119f35b24d446a8f7b1da4a3eaa6d6e3ad982d69 (patch) | |
tree | 62a5dcc6ef125e7fb292ffd2b1b0bd8b47345e4c /xorg-macros.m4.in | |
parent | aeebb46766dada64de246fd9fe72e3c523c4e70e (diff) |
docs: Use m4 to handle optional macro defaults
Handling the optional documentation parameters with m4 allows the help
string to correctly represent the default.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'xorg-macros.m4.in')
-rw-r--r-- | xorg-macros.m4.in | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in index 9f8f7dc..6bd454a 100644 --- a/xorg-macros.m4.in +++ b/xorg-macros.m4.in @@ -787,14 +787,12 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_DOCS],[ -default=$1 -if test "x$default" = x ; then - default="yes" -fi +m4_define([default], m4_default([$1], [yes])) AC_ARG_ENABLE(docs, AS_HELP_STRING([--enable-docs], - [Enable building the documentation (default: yes)]), - [build_docs=$enableval], [build_docs=$default]) + [Enable building the documentation (default: ]default[)]), + [build_docs=$enableval], [build_docs=]default) +m4_undefine([default]) AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) AC_MSG_CHECKING([whether to build documentation]) AC_MSG_RESULT([$build_docs]) @@ -822,14 +820,12 @@ AC_MSG_RESULT([$build_docs]) # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ -devel_default=$1 -if test "x$devel_default" = x ; then - devel_default="yes" -fi +m4_define([devel_default], m4_default([$1], [yes])) AC_ARG_ENABLE(devel-docs, AS_HELP_STRING([--enable-devel-docs], - [Enable building the developer documentation (default: yes)]), - [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) + [Enable building the developer documentation (default: ]devel_default[)]), + [build_devel_docs=$enableval], [build_devel_docs=]devel_default) +m4_undefine([devel_default]) AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) AC_MSG_CHECKING([whether to build developer documentation]) AC_MSG_RESULT([$build_devel_docs]) @@ -857,14 +853,12 @@ AC_MSG_RESULT([$build_devel_docs]) # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_SPECS],[ -spec_default=$1 -if test "x$spec_default" = x ; then - spec_default="yes" -fi +m4_define([spec_default], m4_default([$1], [yes])) AC_ARG_ENABLE(specs, AS_HELP_STRING([--enable-specs], - [Enable building the specs (default: yes)]), - [build_specs=$enableval], [build_specs=$spec_default]) + [Enable building the specs (default: ]spec_default[)]), + [build_specs=$enableval], [build_specs=]spec_default) +m4_undefine([spec_default]) AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) AC_MSG_CHECKING([whether to build functional specifications]) AC_MSG_RESULT([$build_specs]) |