From: Tom Tromey <tom@tromey.com>
To: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: Re: [PATCH] gdb, gdbsupport: configure: factor out yes/no/auto value checking
Date: Tue, 23 Aug 2022 13:17:41 -0600 [thread overview]
Message-ID: <87zgfubwh6.fsf@tromey.com> (raw)
In-Reply-To: <20220817175341.1594352-1-simon.marchi@polymtl.ca> (Simon Marchi via Gdb-patches's message of "Wed, 17 Aug 2022 13:53:41 -0400")
>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
Simon> From: Simon Marchi <simon.marchi@efficios.com>
Simon> Factor out the code that checks that a value is yes/no or yes/no/auto.
Simon> Add two macros to gdbsupport/common.m4 and use them in gdb/configure.ac
Simon> I inspected the changes to configure. Other than whitespace changes, we
Simon> have some benign changes to the error messages (one of them had an error
Simon> actually). There are changes to the --enable-source-highlight and
Simon> --enable-libbacktrace handling, but setting enable_source_highlight /
Simon> enable_libbacktrace was not really useful anyway, they already had the
Simon> right value.
This looks reasonable to me.
Simon> +AC_ARG_ENABLE([gdbmi],
I was very surprised to learn today that this really can be disabled.
Simon> -AC_ARG_ENABLE(source-highlight,
Simon> - AS_HELP_STRING([--enable-source-highlight],
Simon> - [enable source-highlight for source listings]),
Simon> - [case "${enableval}" in
Simon> - yes) enable_source_highlight=yes ;;
Simon> - no) enable_source_highlight=no ;;
Simon> - *) AC_MSG_ERROR(bad value ${enableval} for source-highlight option) ;;
Simon> -esac],
Simon> -[enable_source_highlight=auto])
Simon> +AC_ARG_ENABLE([source-highlight],
Simon> + [AS_HELP_STRING([--enable-source-highlight],
Simon> + [enable source-highlight for source listings])],
Simon> + [GDB_CHECK_YES_NO_VAL([$enableval], [--enable-source-highlight])],
Simon> + [enable_source_highlight=auto])
This defaults to 'auto' but, weirdly, doesn't let one explicitly specify
'auto'. I wonder if switching it to GDB_CHECK_YES_NO_AUTO_VAL would be
an improvement.
Tom
next prev parent reply other threads:[~2022-08-23 19:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-17 17:53 Simon Marchi via Gdb-patches
2022-08-23 19:17 ` Tom Tromey [this message]
2022-08-26 14:29 ` Simon Marchi via Gdb-patches
2022-08-29 16:24 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zgfubwh6.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@efficios.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox