autoconf-patches
[Top][All Lists]
Advanced

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

Re: [Fwd: libtool AC_ARG_WITH and autoconf 2.59]


From: Noah Misch
Subject: Re: [Fwd: libtool AC_ARG_WITH and autoconf 2.59]
Date: Sun, 2 Apr 2006 11:17:55 -0700
User-agent: Mutt/1.5.6i

This is an old patch from a thread of address@hidden beginning with
Message-ID: <address@hidden>.  It adds a macro,
AC_PRESERVE_HELP_ORDER, that makes `configure --help' emit option help strings
in the order in which `configure.ac' defines them, as Autoconf 2.13 did.  These
days, Autoconf emits all --enable-FOOs in order, then all -with-FOOs in order.

Should we install this?  I'm leery of hooks that allow `configure.ac' to
substantially change the `configure' user interface.  This patch is trivial,
though, so I'm inclined to accept it.  We'll want to document the new macro; I
can take care of that, if needed.

On Thu, Aug 25, 2005 at 01:53:10PM -0700, Howard Chu wrote:
> --- general.m4.O      2004-10-01 18:09:15.000000000 -0700
> +++ general.m4        2005-08-25 12:49:04.000000000 -0700
> @@ -1284,14 +1284,25 @@
>  ## Selecting optional features.  ##
>  ## ----------------------------- ##
>  
> +AC_DEFUN([AC_PRESERVE_HELP_ORDER],
> +[m4_define([_AC_PRESERVE_HELP_ORDER], 1)
> +m4_divert_once([HELP_ENABLE], [[
> +Optional Features and Packages:
> +  --disable-FEATURE       do not include FEATURE (same as 
> --enable-FEATURE=no)
> +  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
> +  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
> +  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]])
> +m4_define([_m4_divert(HELP_ENABLE)],    _m4_divert(HELP_WITH))
> +])# AC_PRESERVE_HELP_ORDER
>  
>  # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
>  # ------------------------------------------------------------------------
>  AC_DEFUN([AC_ARG_ENABLE],
> +[m4_ifndef([_AC_PRESERVE_HELP_ORDER],
>  [m4_divert_once([HELP_ENABLE], [[
>  Optional Features:
>    --disable-FEATURE       do not include FEATURE (same as 
> --enable-FEATURE=no)
> -  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]]])dnl
> +  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]]])])dnl
>  m4_divert_once([HELP_ENABLE], [$2])dnl
>  # Check whether --enable-$1 or --disable-$1 was given.
>  if test "[${enable_]m4_bpatsubst([$1], -, _)+set}" = set; then
> @@ -1316,10 +1327,11 @@
>  # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
>  # --------------------------------------------------------------------
>  AC_DEFUN([AC_ARG_WITH],
> +[m4_ifndef([_AC_PRESERVE_HELP_ORDER],
>  [m4_divert_once([HELP_WITH], [[
>  Optional Packages:
>    --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
> -  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]])
> +  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)]])])
>  m4_divert_once([HELP_WITH], [$2])dnl
>  # Check whether --with-$1 or --without-$1 was given.
>  if test "[${with_]m4_bpatsubst([$1], -, _)+set}" = set; then




reply via email to

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