configure: use a platform-neutral prefix
Now that the installation is relocatable, there is no need to compile a Windows-format prefix into Win32 binaries. Instead, the prefix will only be used to compute installation-relative paths, and it can be any string. Drop the "Program Files" path completely: it is only usable on English versions of Windows; therefore, using the NSIS installer to get the "correct" path to the Program Files folder is recommended, and NSIS works just as well with any prefix. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
77d910fb6a
commit
d17f305a26
30
configure
vendored
30
configure
vendored
@ -969,7 +969,7 @@ if test "$mingw32" = "yes" ; then
|
|||||||
# MinGW needs -mthreads for TLS and macro _MT.
|
# MinGW needs -mthreads for TLS and macro _MT.
|
||||||
CFLAGS="-mthreads $CFLAGS"
|
CFLAGS="-mthreads $CFLAGS"
|
||||||
write_c_skeleton;
|
write_c_skeleton;
|
||||||
prefix="c:/Program Files/QEMU"
|
prefix="/qemu"
|
||||||
qemu_suffix=""
|
qemu_suffix=""
|
||||||
libs_qga="-lws2_32 -lwinmm -lpowrprof -lwtsapi32 -lwininet -liphlpapi -lnetapi32 $libs_qga"
|
libs_qga="-lws2_32 -lwinmm -lpowrprof -lwtsapi32 -lwininet -liphlpapi -lnetapi32 $libs_qga"
|
||||||
fi
|
fi
|
||||||
@ -7795,17 +7795,9 @@ echo "strip = $(meson_quote $strip)" >> $cross
|
|||||||
echo "windres = $(meson_quote $windres)" >> $cross
|
echo "windres = $(meson_quote $windres)" >> $cross
|
||||||
if test -n "$cross_prefix"; then
|
if test -n "$cross_prefix"; then
|
||||||
cross_arg="--cross-file config-meson.cross"
|
cross_arg="--cross-file config-meson.cross"
|
||||||
# Hack: Meson expects an absolute path for the *build* machine
|
|
||||||
# for the prefix, so add a slash in front of a Windows path that
|
|
||||||
# includes a drive letter.
|
|
||||||
#
|
|
||||||
# See https://github.com/mesonbuild/meson/issues/7577.
|
|
||||||
echo "[host_machine]" >> $cross
|
echo "[host_machine]" >> $cross
|
||||||
if test "$mingw32" = "yes" ; then
|
if test "$mingw32" = "yes" ; then
|
||||||
echo "system = 'windows'" >> $cross
|
echo "system = 'windows'" >> $cross
|
||||||
case $prefix in
|
|
||||||
?:*) pre_prefix=/ ;;
|
|
||||||
esac
|
|
||||||
fi
|
fi
|
||||||
if test "$linux" = "yes" ; then
|
if test "$linux" = "yes" ; then
|
||||||
echo "system = 'linux'" >> $cross
|
echo "system = 'linux'" >> $cross
|
||||||
@ -7834,16 +7826,16 @@ mv $cross config-meson.cross
|
|||||||
|
|
||||||
rm -rf meson-private meson-info meson-logs
|
rm -rf meson-private meson-info meson-logs
|
||||||
NINJA=${ninja:-$PWD/ninjatool} $meson setup \
|
NINJA=${ninja:-$PWD/ninjatool} $meson setup \
|
||||||
--prefix "${pre_prefix}$prefix" \
|
--prefix "$prefix" \
|
||||||
--libdir "${pre_prefix}$libdir" \
|
--libdir "$libdir" \
|
||||||
--libexecdir "${pre_prefix}$libexecdir" \
|
--libexecdir "$libexecdir" \
|
||||||
--bindir "${pre_prefix}$bindir" \
|
--bindir "$bindir" \
|
||||||
--includedir "${pre_prefix}$includedir" \
|
--includedir "$includedir" \
|
||||||
--datadir "${pre_prefix}$datadir" \
|
--datadir "$datadir" \
|
||||||
--mandir "${pre_prefix}$mandir" \
|
--mandir "$mandir" \
|
||||||
--sysconfdir "${pre_prefix}$sysconfdir" \
|
--sysconfdir "$sysconfdir" \
|
||||||
--localstatedir "${pre_prefix}$local_statedir" \
|
--localstatedir "$local_statedir" \
|
||||||
-Ddocdir="${pre_prefix}$docdir" \
|
-Ddocdir="$docdir" \
|
||||||
-Dqemu_suffix="$qemu_suffix" \
|
-Dqemu_suffix="$qemu_suffix" \
|
||||||
-Doptimization=$(if test "$debug" = yes; then echo 0; else echo 2; fi) \
|
-Doptimization=$(if test "$debug" = yes; then echo 0; else echo 2; fi) \
|
||||||
-Ddebug=$(if test "$debug_info" = yes; then echo true; else echo false; fi) \
|
-Ddebug=$(if test "$debug_info" = yes; then echo true; else echo false; fi) \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user