From 1b5fc91a1daa90fb955f57937f4590c5079dd161 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Tue, 13 Dec 2022 23:17:48 +0000 Subject: [PATCH] Cygwin: configure: Add option to disable building 'dumper' 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 gcc-g++, Additionally, building the dumper utility requires gettext-devel, libiconv-devel -zlib-devel. +zlib-devel. Building this program can be disabled with the +--disable-dumper option to configure.