From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113274 invoked by alias); 4 Oct 2018 18:03:38 -0000 Mailing-List: contact cygwin-apps-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cygwin-apps-cvs-owner@sourceware.org Received: (qmail 113226 invoked by uid 9795); 4 Oct 2018 18:03:38 -0000 Date: Thu, 04 Oct 2018 18:03:00 -0000 Message-ID: <20181004180338.113197.qmail@sourceware.org> From: jturney@sourceware.org To: cygwin-apps-cvs@sourceware.org Subject: [setup - the official Cygwin setup program] branch master, updated. release_2.893-7-g5bbeca9 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 4221a2166b376dad13bfb0c1ac5c080f4ff7cd59 X-Git-Newrev: 5bbeca954a98f2936f58f289f23e9dca66540eb0 X-SW-Source: 2018-q4/txt/msg00002.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=5bbeca954a98f2936f58f289f23e9dca66540eb0 commit 5bbeca954a98f2936f58f289f23e9dca66540eb0 Author: Jon Turney 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 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"