[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/10] configure, meson: move simple OS definitions to meson
From: |
Paolo Bonzini |
Subject: |
[PATCH 08/10] configure, meson: move simple OS definitions to meson |
Date: |
Tue, 29 Aug 2023 10:29:29 +0200 |
CONFIG_DARWIN and CONFIG_SOLARIS are only used in C sources.
Move them to config_host_data.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 12 ------------
hw/9pfs/meson.build | 4 +++-
meson.build | 2 ++
3 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/configure b/configure
index 4a7e7afb996..eba5befa2cf 100755
--- a/configure
+++ b/configure
@@ -377,7 +377,6 @@ fi
mingw32="no"
bsd="no"
linux="no"
-solaris="no"
case $targetos in
windows)
mingw32="yes"
@@ -402,10 +401,6 @@ openbsd)
;;
darwin)
bsd="yes"
- darwin="yes"
-;;
-sunos)
- solaris="yes"
;;
haiku)
pie="no"
@@ -1726,13 +1721,6 @@ if test "$linux" = "yes" ; then
echo "CONFIG_LINUX=y" >> $config_host_mak
fi
-if test "$darwin" = "yes" ; then
- echo "CONFIG_DARWIN=y" >> $config_host_mak
-fi
-
-if test "$solaris" = "yes" ; then
- echo "CONFIG_SOLARIS=y" >> $config_host_mak
-fi
echo "SRC_PATH=$source_path" >> $config_host_mak
echo "TARGET_DIRS=$target_list" >> $config_host_mak
diff --git a/hw/9pfs/meson.build b/hw/9pfs/meson.build
index 2944ea63c38..c6a2ccfcc85 100644
--- a/hw/9pfs/meson.build
+++ b/hw/9pfs/meson.build
@@ -14,7 +14,9 @@ fs_ss.add(files(
'coxattr.c',
))
fs_ss.add(when: 'CONFIG_LINUX', if_true: files('9p-util-linux.c'))
-fs_ss.add(when: 'CONFIG_DARWIN', if_true: files('9p-util-darwin.c'))
+if targetos == 'darwin'
+ fs_ss.add(files('9p-util-darwin.c'))
+endif
fs_ss.add(when: 'CONFIG_XEN_BUS', if_true: files('xen-9p-backend.c'))
system_ss.add_all(when: 'CONFIG_FSDEV_9P', if_true: fs_ss)
diff --git a/meson.build b/meson.build
index 02b035a3808..d3d10140c57 100644
--- a/meson.build
+++ b/meson.build
@@ -2070,6 +2070,7 @@ config_host_data.set('CONFIG_ATTR', libattr.found())
config_host_data.set('CONFIG_BDRV_WHITELIST_TOOLS',
get_option('block_drv_whitelist_in_tools'))
config_host_data.set('CONFIG_BRLAPI', brlapi.found())
config_host_data.set('CONFIG_COCOA', cocoa.found())
+config_host_data.set('CONFIG_DARWIN', targetos == 'darwin')
config_host_data.set('CONFIG_FUZZ', get_option('fuzzing'))
config_host_data.set('CONFIG_GCOV', get_option('b_coverage'))
config_host_data.set('CONFIG_LIBUDEV', libudev.found())
@@ -2125,6 +2126,7 @@ if seccomp.found()
config_host_data.set('CONFIG_SECCOMP_SYSRAWRC', seccomp_has_sysrawrc)
endif
config_host_data.set('CONFIG_SNAPPY', snappy.found())
+config_host_data.set('CONFIG_SOLARIS', targetos == 'sunos')
config_host_data.set('CONFIG_TPM', have_tpm)
config_host_data.set('CONFIG_TSAN', get_option('tsan'))
config_host_data.set('CONFIG_USB_LIBUSB', libusb.found())
--
2.41.0
- Re: [PATCH 09/10] configure: remove $linux and $mingw32 variables, (continued)