nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] --disable-nanorc does not disable support and use of na


From: Benno Schulenberg
Subject: Re: [Nano-devel] --disable-nanorc does not disable support and use of nanorc
Date: Thu, 27 Mar 2014 11:30:24 +0100

On Thu, Mar 27, 2014, at 1:58, Mike Frysinger wrote:
> On Wed 26 Mar 2014 20:42:41 Benno Schulenberg wrote:
> > In the past, apparently, some things were not enabled by default,
> > for example the use of nanorc files and of colours.  The latter needs
> > the first, so --enable-color would automatically activate --enable-nanorc.
> 
> the configure help strings make it read like these features were enabled by
> default already and you had to explicitly opt out.

Indeed.  But the texinfo documentation still speaks of the --enable varieties.
Looking back in history, these options started to default to enabled in r4330,
in September 2008.

> i think enabling all these
> cool features by default makes sense rather than forcing people to opt in to
> specific ones.

Fully agreed with that.

> i think we need to barf when we get conflicting options.  so in this case, you
> want something like:
> 
> --- a/configure.ac
> +++ b/configure.ac
> @@ -146,10 +146,17 @@ fi
>  
>  AC_ARG_ENABLE(color,
>  AS_HELP_STRING([--disable-color], [Disable color and syntax highlighting]))
> +if test "x$enable_nanorc" = xno; then

But... how can one test for 'enable_nanorc' here when it gets set further down?
True, it works, I've tried, but... how?  Does it run through the thing twice 
somehow?

> +    if test "x$enable_color" = xyes; then
> +     AC_MSG_ERROR([--enable-color cannot work with --disable-nanorc])
> +    else
> +     enable_color=no
> +    fi
> +fi
> +
>  if test "x$enable_color" != xno; then
>      if test x$ac_cv_header_regex_h = xyes; then
> -     AC_DEFINE(ENABLE_NANORC, 1, [Define this to use .nanorc files.])
> -     nanorc_support=yes
> +     enable_nanorc=yes

Applied.  Thanks.

>  AC_MSG_CHECKING([whether to enable UTF-8 support])
> -enable_utf8=auto
>  AC_ARG_ENABLE(utf8, AS_HELP_STRING([--enable-utf8], [Enable UTF-8 support]))
> -AC_MSG_RESULT($enable_utf8)
> +AC_MSG_RESULT(${enable_utf8:-auto})

Applied too.  Thanks.

Benno

-- 
http://www.fastmail.fm - mmm... Fastmail...




reply via email to

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