First batch of configure cleanups
cover First batch of configure cleanups
After the Meson cleanups from yesterday, here are some small improvements to configure, mostly removing obsolete code.
Paolo
Paolo Bonzini (4):
configure: remove useless code to check for Xen PCI passthrough
configure: remove variable bogus_os
configure: accept --enable-slirp
configure: remove CONFIG_FILEVERSION and CONFIG_PRODUCTVERSION
configure | 27 +++------------------------ version.rc | 4 ++-- 2 files changed, 5 insertions(+), 26 deletions(-)
Signature · 1 line
2.29.2
PATCH 1/4 configure: remove useless code to check for Xen PCI passthrough
meson.build is already doing the same check, so remove it from configure.
--- configure | 12 ------------ 1 file changed, 12 deletions(-)
configure +0 -12
@@ -2879,18 +2879,6 @@ EOF fi fi -if test "$xen_pci_passthrough" != "disabled"; then - if test "$xen" = "enabled" && test "$linux" = "yes"; then - xen_pci_passthrough=enabled - else - if test "$xen_pci_passthrough" = "enabled"; then - error_exit "User requested feature Xen PCI Passthrough" \ - " but this feature requires /sys from Linux" - fi - xen_pci_passthrough=disabled - fi -fi - ########################################## # X11 probe if $pkg_config --exists "x11"; then
Signature · 1 line
2.29.2
Re: [PATCH 1/4] configure: remove useless code to check for Xen PCI passthrough
Quoted 5 lines · Paolo Bonzini
meson.build is already doing the same check, so remove it from configure.
Signed-off-by Paolo Bonzini <[email protected]>
---
Quoted 32 lines
configure | 12 ------------ 1 file changed, 12 deletions(-)configure +0
-13@@ -2879,18 +2879,6 @@ EOF fi fi -if test "$xen_pci_passthrough" != "disabled"; then - if test "$xen" = "enabled" && test "$linux" = "yes"; then - xen_pci_passthrough=enabled - else - if test "$xen_pci_passthrough" = "enabled"; then - error_exit "User requested feature Xen PCI Passthrough" \ - " but this feature requires /sys from Linux" - fi - xen_pci_passthrough=disabled - fi -fi - ########################################## # X11 probe if $pkg_config --exists "x11"; then --2.29.2
Signature · 1 line
Marc-André Lureau
PATCH 2/4 configure: remove variable bogus_os
In reply to Paolo BonziniThe condition can be tested also from $targetos, clean up.
--- configure | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
configure +1 -3
@@ -467,7 +467,6 @@ gettext="auto" fuse="auto" fuse_lseek="auto" -bogus_os="no" malloc_trim="auto" # parse CC options second
@@ -620,7 +619,6 @@ else # might be going to just print the --help text, or it might # be the result of a missing compiler. targetos='bogus' - bogus_os='yes' fi # Some host OSes need non-standard checks for which CPU to use.
@@ -2016,7 +2014,7 @@ if test -z "$werror" ; then fi fi -if test "$bogus_os" = "yes"; then +if test "$targetos" = "bogus"; then # Now that we know that we're not printing the help and that # the compiler works (so the results of the check_defines we used # to identify the OS are reliable), if we didn't recognize the
Signature · 1 line
2.29.2
Re: [PATCH 2/4] configure: remove variable bogus_os
Quoted 29 lines · Paolo Bonzini
The condition can be tested also from $targetos, clean up.
Signed-off-by Paolo Bonzini <[email protected]>--- configure | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)configure +0
-2@@ -467,7 +467,6 @@ gettext="auto" fuse="auto" fuse_lseek="auto" -bogus_os="no" malloc_trim="auto" # parse CC options second@@ -620,7 +619,6 @@ else # might be going to just print the --help text, or it might # be the result of a missing compiler. targetos='bogus' - bogus_os='yes' fi # Some host OSes need non-standard checks for which CPU to use.
configure if test -z "$werror" ; then · line 2020
Quoted 8 lines
configure +1
-1@@ -2016,7 +2014,7 @@ if test -z "$werror" ; then fi fi -if test "$bogus_os" = "yes"; then +if test "$targetos" = "bogus"; then # Now that we know that we're not printing the help and that # the compiler works (so the results of the check_defines we used # to identify the OS are reliable), if we didn't recognize the
Re: [PATCH 2/4] configure: remove variable bogus_os
In reply to Paolo BonziniQuoted 4 lines · Paolo Bonzini
The condition can be tested also from $targetos, clean up.
Signed-off-by Paolo Bonzini <[email protected]>
---
Quoted 38 lines
configure | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)configure +1
-4@@ -467,7 +467,6 @@ gettext="auto" fuse="auto" fuse_lseek="auto" -bogus_os="no" malloc_trim="auto" # parse CC options second@@ -620,7 +619,6 @@ else # might be going to just print the --help text, or it might # be the result of a missing compiler. targetos='bogus' - bogus_os='yes' fi # Some host OSes need non-standard checks for which CPU to use.@@ -2016,7 +2014,7 @@ if test -z "$werror" ; then fi fi -if test "$bogus_os" = "yes"; then +if test "$targetos" = "bogus"; then # Now that we know that we're not printing the help and that # the compiler works (so the results of the check_defines we used # to identify the OS are reliable), if we didn't recognize the --2.29.2
Signature · 1 line
Marc-André Lureau
PATCH 3/4 configure: accept --enable-slirp
In reply to Paolo BonziniMeson understands -Dslirp=enabled, so there is no reason not to accept the configure option as well.
--- configure | 2 ++ 1 file changed, 2 insertions(+)
configure +2 -0
@@ -1083,6 +1083,8 @@ for opt do ;; --disable-slirp) slirp="disabled" ;; + --enable-slirp) slirp="enabled" + ;; --enable-slirp=git) slirp="internal" ;; --enable-slirp=system) slirp="system"
Signature · 1 line
2.29.2
Re: [PATCH 3/4] configure: accept --enable-slirp
Quoted 14 lines · Paolo Bonzini
Meson understands -Dslirp=enabled, so there is no reason not to accept the configure option as well.
Signed-off-by Paolo Bonzini <[email protected]>--- configure | 2 ++ 1 file changed, 2 insertions(+)configure +0
-0
configure for opt do · line 1090
Quoted 8 lines
configure +2
-0@@ -1083,6 +1083,8 @@ for opt do ;; --disable-slirp) slirp="disabled" ;; + --enable-slirp) slirp="enabled" + ;; --enable-slirp=git) slirp="internal" ;; --enable-slirp=system) slirp="system"
Re: [PATCH 3/4] configure: accept --enable-slirp
In reply to Paolo BonziniQuoted 5 lines · Paolo Bonzini
Meson understands -Dslirp=enabled, so there is no reason not to accept the configure option as well.
Signed-off-by Paolo Bonzini <[email protected]>
---
Quoted 22 lines
configure | 2 ++ 1 file changed, 2 insertions(+)configure +2
-1@@ -1083,6 +1083,8 @@ for opt do ;; --disable-slirp) slirp="disabled" ;; + --enable-slirp) slirp="enabled" + ;; --enable-slirp=git) slirp="internal" ;; --enable-slirp=system) slirp="system" --2.29.2
Signature · 1 line
Marc-André Lureau
PATCH 4/4 configure: remove CONFIG_FILEVERSION and CONFIG_PRODUCTVERSION
In reply to Paolo Bonziniversion.rc can just use existing preprocessor symbols.
--- configure | 9 --------- version.rc | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-)
configure +0 -9
@@ -5929,15 +5929,6 @@ if test "$bigendian" = "yes" ; then fi if test "$mingw32" = "yes" ; then echo "CONFIG_WIN32=y" >> $config_host_mak - rc_version=$(cat $source_path/VERSION) - version_major=${rc_version%%.*} - rc_version=${rc_version#*.} - version_minor=${rc_version%%.*} - rc_version=${rc_version#*.} - version_subminor=${rc_version%%.*} - version_micro=0 - echo "CONFIG_FILEVERSION=$version_major,$version_minor,$version_subminor,$version_micro" >> $config_host_mak - echo "CONFIG_PRODUCTVERSION=$version_major,$version_minor,$version_subminor,$version_micro" >> $config_host_mak if test "$guest_agent_with_vss" = "yes" ; then echo "CONFIG_QGA_VSS=y" >> $config_host_mak echo "QGA_VSS_PROVIDER=$qga_vss_provider" >> $config_host_mak
version.rc +2 -2
@@ -2,8 +2,8 @@ #include "config-host.h" VS_VERSION_INFO VERSIONINFO -FILEVERSION CONFIG_FILEVERSION -PRODUCTVERSION CONFIG_PRODUCTVERSION +FILEVERSION QEMU_VERSION_MAJOR,QEMU_VERSION_MINOR,QEMU_VERSION_MICRO,0 +PRODUCTVERSION QEMU_VERSION_MAJOR,QEMU_VERSION_MINOR,QEMU_VERSION_MICRO,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEOS VOS_NT_WINDOWS32 FILETYPE VFT_APP
Signature · 1 line
2.29.2
Re: [PATCH 4/4] configure: remove CONFIG_FILEVERSION and CONFIG_PRODUCTVERSION
Quoted 4 lines · Paolo Bonzini
version.rc can just use existing preprocessor symbols.
Signed-off-by Paolo Bonzini <[email protected]>
---
Quoted 46 lines
configure | 9 --------- version.rc | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-)configure +0
-8@@ -5929,15 +5929,6 @@ if test "$bigendian" = "yes" ; then fi if test "$mingw32" = "yes" ; then echo "CONFIG_WIN32=y" >> $config_host_mak - rc_version=$(cat $source_path/VERSION) - version_major=${rc_version%%.*} - rc_version=${rc_version#*.} - version_minor=${rc_version%%.*} - rc_version=${rc_version#*.} - version_subminor=${rc_version%%.*} - version_micro=0 - echo"
CONFIG_FILEVERSION=$version_major,$version_minor,$version_subminor,$version_micro"Quoted 1 line
Quoted 1 line
$config_host_mak
- echo "
CONFIG_PRODUCTVERSION=$version_major,$version_minor,$version_subminor,$version_micro"Quoted 1 line
Quoted 1 line
$config_host_mak
if test "$guest_agent_with_vss" = "yes" ; then
echo "CONFIG_QGA_VSS=y" >> $config_host_mak
echo "QGA_VSS_PROVIDER=$qga_vss_provider" >> $config_host_makversion.rc +2
-3@@ -2,8 +2,8 @@ #include "config-host.h" VS_VERSION_INFO VERSIONINFO -FILEVERSION CONFIG_FILEVERSION -PRODUCTVERSION CONFIG_PRODUCTVERSION +FILEVERSION QEMU_VERSION_MAJOR,QEMU_VERSION_MINOR,QEMU_VERSION_MICRO,0 +PRODUCTVERSION QEMU_VERSION_MAJOR,QEMU_VERSION_MINOR,QEMU_VERSION_MICRO,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK FILEOS VOS_NT_WINDOWS32 FILETYPE VFT_APP --2.29.2
Signature · 1 line
Marc-André Lureau