From nobody Wed May 1 21:33:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1610485663; cv=none; d=zohomail.com; s=zohoarc; b=IAu9zo9PR0LYF8YSY3uCjEbPCQvA8uCdKTpDdQfCBn6GsL/AnFMPpU5AbmG2gr6FgyylgQelInMud7V+pulf8Zs7KVGZEoLE6/9yilLmoxwUDV1g/qOOQaEpTTRwzHMbxleRm69E4erf2n4Eit2kR2mweQ5R0y18kSB2hnbsNg4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610485663; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=wA1Olew9SX3UK3sLbOhqAXGgUJnTyIMPBI7bKnFIgQc=; b=XtQfs/UbgGkSbJ9kuK20+ghhQh/tK9P5VD+hLyTqOlJsx7Y7ioGLDVFJFcsqwiu7PnJgOZsMzylocSGQMR9vYJ7Qq07m9/4GCHgsIDjz42CaXoh6wV2U5q5JSRxl/bePqnkAn7wB7Swu3cYj6eaEnjZ1XN5fOUoYjQmR0Ikgt2g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1610485663964731.7157133079296; Tue, 12 Jan 2021 13:07:43 -0800 (PST) Received: from localhost ([::1]:42688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzQtC-00023D-PM for importer@patchew.org; Tue, 12 Jan 2021 16:07:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzQoO-0004kx-NL for qemu-devel@nongnu.org; Tue, 12 Jan 2021 16:02:44 -0500 Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]:46938) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kzQoN-00081s-4m for qemu-devel@nongnu.org; Tue, 12 Jan 2021 16:02:44 -0500 Received: by mail-oi1-x22a.google.com with SMTP id q205so3795637oig.13 for ; Tue, 12 Jan 2021 13:02:42 -0800 (PST) Received: from localhost.localdomain ([2605:a601:ac3d:c100:e3e8:d9:3a56:e27d]) by smtp.gmail.com with ESMTPSA id e10sm880160otl.38.2021.01.12.13.02.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jan 2021 13:02:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wA1Olew9SX3UK3sLbOhqAXGgUJnTyIMPBI7bKnFIgQc=; b=QVb05CB+SFhGTXwQfoVfFu2tcIPGp5/y5tVwEVHM3NbDLYemzgB6oUpdQHLtjhFaTm 4M6ztBp7cvPHEx9ReSNINsPVNu/mmZ9f3t6cDfTdxIL0zVPfsOhiD00/nOI56YsGq1aN +ijhL4trl+ODUFuL4X4NFn8XtkfhbFFUn1+qenSGSNVbOH7h0g0LUo2d3wRslx68WTgQ 3UbhICjf9SpIED4oWw4ODqlbK1chD7UYRXpgKfa4JCSv7ConoF0FJQeWk+ny3joQ7knB 1sS8TmO/zygloRVZFdAJBIVFqFty7QoIlIqkA/Jk2XHyRYpvwIEFE3QPcfIU/kRQkM6Z 5pwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wA1Olew9SX3UK3sLbOhqAXGgUJnTyIMPBI7bKnFIgQc=; b=DZ52I7oHYXYckZuTTWur/YLW7lzyFKJObfsrz+ctTl0+jGEKxJi2mCs4K2Q8u3VuWO YFOrfBYWnKoYINOrohHT1bSAg+C5xQtxknjc60MpLPEWN8MbY+NMEC3dNwZvVNCCAdtw oWJrCHRpG1P6tsaqaf2O7as15vYlGUzHVGV36h1PjPVe1w50ZGU/cOeBb43/cCsevNSC fd41s/iuzLYER7zvxeWqKfRsTOJaugx2cXKnvQ/3s1vj8546G9h4irF6l2xVMngn9Xbt keqMxikzTAQ9o2sNQxTdkPrdTLsYTN4Fw1ZAyF+RWdsILELf7OVTJq/lJCISEqtDcuF0 JqKQ== X-Gm-Message-State: AOAM532Z8x+8RyHqTIfZkjQVmXgQ10UqdLoUgB95lsOJ/ChX0P0J3OKh zmNqOhkiMesqcQR+aCiGyr4i8lokNYiUBQ== X-Google-Smtp-Source: ABdhPJwHyDoSDtpbnM9l0DJfy9VxJD30kCInY9CukDCu6uAw0QF7RvAfNhOmh2KO2DU2YpgVBYFWKg== X-Received: by 2002:aca:5e42:: with SMTP id s63mr670540oib.96.1610485361250; Tue, 12 Jan 2021 13:02:41 -0800 (PST) From: Joshua Watt X-Google-Original-From: Joshua Watt To: qemu-devel@nongnu.org Subject: [PATCH v2] configure: MinGW respect --bindir argument Date: Tue, 12 Jan 2021 15:02:39 -0600 Message-Id: <20210112210239.28836-1-JPEWhacker@gmail.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210107213856.34170-1-JPEWhacker@gmail.com> References: <20210107213856.34170-1-JPEWhacker@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::22a; envelope-from=jpewhacker@gmail.com; helo=mail-oi1-x22a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, thuth@redhat.com, luoyonggang@gmail.com, Joshua Watt Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @gmail.com) Content-Type: text/plain; charset="utf-8" There are two cases that need to be accounted for when compiling QEMU for MinGW32: 1) A standalone distribution, where QEMU is self contained and extracted by the user, such as a user would download from the QEMU website. In this case, all the QEMU executable files should be rooted in $prefix to ensure they can be easily found by the user 2) QEMU integrated into a distribution image/sysroot/SDK and distributed with other programs. In this case, the provided arguments for bindir/datadir/etc. should be respected as they for a Linux build. Restructures the MinGW path configuration so that all of the paths except bindir use the same rules as when building for other platforms. This satisfies #2 and #1 since these files do not need to be directly in $prefix anyway. The handling for --bindir is changed so that it defaults to $prefix on MinGW (maintaining the compatibility with #1), but if the user specifies a specific path when configuring it can also satisfy #2. Signed-off-by: Joshua Watt Reviewed-by: Thomas Huth --- configure | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/configure b/configure index 5860bdb77b..092e2926bc 100755 --- a/configure +++ b/configure @@ -1571,20 +1571,15 @@ libexecdir=3D"${libexecdir:-$prefix/libexec}" includedir=3D"${includedir:-$prefix/include}" =20 if test "$mingw32" =3D "yes" ; then - mandir=3D"$prefix" - datadir=3D"$prefix" - docdir=3D"$prefix" - bindir=3D"$prefix" - sysconfdir=3D"$prefix" - local_statedir=3D"$prefix" + bindir=3D"${bindir:-$prefix}" else - mandir=3D"${mandir:-$prefix/share/man}" - datadir=3D"${datadir:-$prefix/share}" - docdir=3D"${docdir:-$prefix/share/doc}" bindir=3D"${bindir:-$prefix/bin}" - sysconfdir=3D"${sysconfdir:-$prefix/etc}" - local_statedir=3D"${local_statedir:-$prefix/var}" fi +mandir=3D"${mandir:-$prefix/share/man}" +datadir=3D"${datadir:-$prefix/share}" +docdir=3D"${docdir:-$prefix/share/doc}" +sysconfdir=3D"${sysconfdir:-$prefix/etc}" +local_statedir=3D"${local_statedir:-$prefix/var}" firmwarepath=3D"${firmwarepath:-$datadir/qemu-firmware}" localedir=3D"${localedir:-$datadir/locale}" =20 --=20 2.30.0