public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Jon Turney <jon.turney@dronecode.org.uk>
To: cygwin-patches@cygwin.com
Cc: Jon Turney <jon.turney@dronecode.org.uk>
Subject: [PATCH 2/2] Cygwin: configure: Add option to disable building 'dumper'
Date: Wed, 14 Dec 2022 17:30:39 +0000	[thread overview]
Message-ID: <20221214173040.8431-3-jon.turney@dronecode.org.uk> (raw)
In-Reply-To: <20221214173040.8431-1-jon.turney@dronecode.org.uk>

Rather than guessing, based on just the presence of libbfd, add an
explicit configuration option, to build dumper or not, defaulting to
building it.

This might have some use when bootstrapping Cygwin for a new
architecture, or when building your own Cygwin-targetted cross-compiler,
rather than installing one from the copr, along with the dependencies of
libbfd.
---
 winsup/configure.ac            | 8 +++++---
 winsup/doc/faq-programming.xml | 3 ++-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/winsup/configure.ac b/winsup/configure.ac
index 9205a8886..7a2121dae 100644
--- a/winsup/configure.ac
+++ b/winsup/configure.ac
@@ -111,10 +111,12 @@ AM_CONDITIONAL(CROSS_BOOTSTRAP, [test "x$with_cross_bootstrap" != "xyes"])
 
 AC_EXEEXT
 
-AC_CHECK_LIB([bfd], [bfd_init], [true],
-	     AC_MSG_WARN([Not building dumper.exe since some required libraries or headers are missing]))
+AC_ARG_ENABLE([dumper],
+	      [AS_HELP_STRING([--disable-dumper], [do not build the 'dumper' utility])],
+	      [build_dumper=$enableval],
+	      [build_dumper=yes])
 
-AM_CONDITIONAL(BUILD_DUMPER, [test "x$ac_cv_lib_bfd_bfd_init" = "xyes"])
+AM_CONDITIONAL(BUILD_DUMPER, [test "x$build_dumper" = "xyes"])
 
 AC_CONFIG_FILES([
     Makefile
diff --git a/winsup/doc/faq-programming.xml b/winsup/doc/faq-programming.xml
index a24b781cf..24c7f928e 100644
--- a/winsup/doc/faq-programming.xml
+++ b/winsup/doc/faq-programming.xml
@@ -685,7 +685,8 @@ installed; you at least need <literal>gcc-g++</literal>,
 <para>
 Additionally, building the <code>dumper</code> utility requires
 <literal>gettext-devel</literal>, <literal>libiconv-devel</literal>
-<literal>zlib-devel</literal>.
+<literal>zlib-devel</literal>.  Building this program can be disabled with the
+<literal>--disable-dumper</literal> option to <literal>configure</literal>.
 </para>
 
 <para>
-- 
2.39.0


  parent reply	other threads:[~2022-12-14 17:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14 17:30 [PATCH 0/2] Improvements in configure options for reducing dependencies Jon Turney
2022-12-14 17:30 ` [PATCH 1/2] Cygwin: FAQ: Mention configure options to build with reduced dependencies Jon Turney
2022-12-14 17:30 ` Jon Turney [this message]
2022-12-14 18:48 ` [PATCH 0/2] Improvements in configure options for reducing dependencies Corinna Vinschen

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=20221214173040.8431-3-jon.turney@dronecode.org.uk \
    --to=jon.turney@dronecode.org.uk \
    --cc=cygwin-patches@cygwin.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).