winsup/configure.ac needs some TLC ...

"J.H. vd Water via Cygwin" <[email protected]>
Newsgroups gmane.os.cygwin
Message-ID <[email protected]>
Hi,

I think winsup/configure.ac needs some TLC ...

Yes, you can specify "--without-cross-bootstrap" in order to skip building
with the MinGW toolchain, but only after the relevant macro and subsequent
test have been modified, as follows: (proof follows testfile)

Testfile: relevant part of winsup/configure.ac

AC_INIT([myproject], [123], [[email protected]], [https://autotools.io/])

# Useful for bootstrapping a cross-compiler: specify --without-cross-bootstrap in order
# to NOT check for MinGW libraries (a relevant comment to be added to this file?)

# winsup/configure.ac around line 43:

AC_ARG_WITH([cross_bootstrap],
  [AS_HELP_STRING([--with-cross-bootstrap],
    [ hunt for the MinGW Toolchain ...])], # [a]
  [],
  [with_cross_bootstrap=yes]) # <==== default if no switch is specified (modified from no to yes)

# [a] to be replaced by
# [build programs using the MinGW toolchain ...])],
# OR:
# [specify --without-cross-bootstrap in order to skip building with the MinGW toolchain ...)])],
# OR:
# ... whatever you think is appropriate ...

# --with-FOO      => with_ := yes       do hunt for the mingw tools
# --with-FOO=yes  => with_ := yes       do hunt for the mingw tools
# --without-FOO   => with_ := no        do NOT hunt for the mingw tools
# --with-FOO=no   => with_ := no        do NOT hunt for the mingw tools
# --with-FOO=none => with_ := none      do hunt for the mingw tools (none = anything else than yes or no)
echo $with_cross_bootstrap

# winsup/configure.ac around line 135:

# Note: the present test is inadequate ... <==== modified test!
if test "x$with_cross_bootstrap" == "xyes" ||
   test "x$with_cross_bootstrap" != "xno"; then
  echo "... Hunt for the mingw tools"  echo "... Hunt for the mingw tools"
fi

echo "Hi"
# eof

R. Henri

Proof:

@@ rm -fr autom4te.cache configure
@@ autoconf

@@ ./configure
yes
... Hunt for the MinGW Toolchain.
Hi
@@ ./configure --without-cross-bootstrap <====
no
Hi
@@ ./configure --with-cross-bootstrap
yes
... Hunt for the MinGW Toolchain.
Hi

Argument provided to the --with-FOO switch:

@@ ./configure --with-cross-bootstrap=yes
yes
... Hunt for the MinGW Toolchain.
Hi
@@ ./configure --with-cross-bootstrap=no
no
Hi
@@ ./configure --with-cross-bootstrap=none
none
... Hunt for the MinGW Toolchain.
Hi

However:
As expected: only the --with-FOO switch accepts an argument

@@ ./configure --without-cross-bootstrap=yes
configure: error: invalid package name: cross-bootstrap=yes
# abort! (retval == 1)
@@ ./configure --without-cross-bootstrap=no
configure: error: invalid package name: cross-bootstrap=no
# abort! (retval == 1)
@@

=====

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.