Skip to content

Commit 15588a6

Browse files
JPEWdevbonzini
authored andcommitted
configure: MinGW respect --bindir argument
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 <JPEWhacker@gmail.com> Message-Id: <20210112210239.28836-1-JPEWhacker@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent c27025e commit 15588a6

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

configure

+6-11
Original file line numberDiff line numberDiff line change
@@ -1571,20 +1571,15 @@ libexecdir="${libexecdir:-$prefix/libexec}"
15711571
includedir="${includedir:-$prefix/include}"
15721572

15731573
if test "$mingw32" = "yes" ; then
1574-
mandir="$prefix"
1575-
datadir="$prefix"
1576-
docdir="$prefix"
1577-
bindir="$prefix"
1578-
sysconfdir="$prefix"
1579-
local_statedir="$prefix"
1574+
bindir="${bindir:-$prefix}"
15801575
else
1581-
mandir="${mandir:-$prefix/share/man}"
1582-
datadir="${datadir:-$prefix/share}"
1583-
docdir="${docdir:-$prefix/share/doc}"
15841576
bindir="${bindir:-$prefix/bin}"
1585-
sysconfdir="${sysconfdir:-$prefix/etc}"
1586-
local_statedir="${local_statedir:-$prefix/var}"
15871577
fi
1578+
mandir="${mandir:-$prefix/share/man}"
1579+
datadir="${datadir:-$prefix/share}"
1580+
docdir="${docdir:-$prefix/share/doc}"
1581+
sysconfdir="${sysconfdir:-$prefix/etc}"
1582+
local_statedir="${local_statedir:-$prefix/var}"
15881583
firmwarepath="${firmwarepath:-$datadir/qemu-firmware}"
15891584
localedir="${localedir:-$datadir/locale}"
15901585

0 commit comments

Comments
 (0)