[setup - the official Cygwin setup program] branch master, updated. release_2.893-7-g5bbeca9
jturney-9JcytcrH/[email protected]
| Newsgroups | gmane.os.cygwin.cvs.apps |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=5bbeca954a98f2936f58f289f23e9dca66540eb0 commit 5bbeca954a98f2936f58f289f23e9dca66540eb0 Author: Jon Turney <[email protected]> Date: Thu Oct 4 18:26:55 2018 +0100 Allow host machine to be specified to bootstrap Allow host machine to be specified to bootstrap, rather than it picking the first one it finds a compiler for https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=227ce6b30d0acd277c75caf4c5d88a3ab5506a2e commit 227ce6b30d0acd277c75caf4c5d88a3ab5506a2e Author: Jon Turney <[email protected]> Date: Thu Oct 4 14:01:50 2018 +0100 Improve libgcrypt detection Set ACLOCAL_PATH so libgcrypt.m4 from cross-package is found, if it is the only one installed. Accomodate older libgcrypt.m4, which doesn't check SYSROOT Diff: --- bootstrap.sh | 27 +++++++++++++++------------ configure.ac | 3 +-- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 1d388da..6dcd0ed 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash # Used to setup the configure.in, autoheader and Makefile.in's if configure # has not been generated. This script is only needed for developers when # configure has not been run, or if a Makefile.am in a non-configured directory @@ -26,6 +26,20 @@ if [ ! -f main.cc ]; then exit 1 fi +if [[ "$1" =~ "--host=" ]]; then + host="${1#--host=}" +elif hash i686-w64-mingw32-g++ 2> /dev/null; then + host="i686-w64-mingw32" +elif hash i686-pc-mingw32-g++ 2> /dev/null; then + host="i686-pc-mingw32" +elif hash x86_64-w64-mingw32-g++ 2> /dev/null; then + host="x86_64-w64-mingw32" +else + echo "mingw32 or mingw64 target g++ required for building setup" + exit 1 +fi + +export ACLOCAL_PATH=$($host-g++ --print-sysroot)/mingw/share/aclocal # Make sure cfgaux exists mkdir -p cfgaux @@ -51,17 +65,6 @@ cd "$builddir" build=`$srcdir/cfgaux/config.guess` -if hash i686-w64-mingw32-g++ 2> /dev/null; then - host="i686-w64-mingw32" -elif hash i686-pc-mingw32-g++ 2> /dev/null; then - host="i686-pc-mingw32" -elif hash x86_64-w64-mingw32-g++ 2> /dev/null; then - host="x86_64-w64-mingw32" -else - echo "mingw32 or mingw64 target g++ required for building setup" - exit 1 -fi - echo "running configure" $srcdir/configure -C --build=$build --host=$host "$@" diff --git a/configure.ac b/configure.ac index 103b89e..3854088 100644 --- a/configure.ac +++ b/configure.ac @@ -54,9 +54,8 @@ PKG_CHECK_MODULES(LZMA, [liblzma]) PKG_CHECK_MODULES(LIBSOLV, [libsolv]) dnl dependencies we need to check for by hand -export SYSROOT=$($CC --print-sysroot)/mingw +export LIBGCRYPT_CONFIG=$($CC --print-sysroot)/mingw/bin/libgcrypt-config AM_PATH_LIBGCRYPT -unset SYSROOT save_LIBS=$LIBS LIBS="$LIBS -lbz2"