aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build20
1 files changed, 20 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 010d2c649c..1be9f92f7d 100644
--- a/meson.build
+++ b/meson.build
@@ -2111,6 +2111,7 @@ config_host_data.set('CONFIG_OPENGL', opengl.found())
config_host_data.set('CONFIG_PLUGIN', get_option('plugins'))
config_host_data.set('CONFIG_RBD', rbd.found())
config_host_data.set('CONFIG_RDMA', rdma.found())
+config_host_data.set('CONFIG_RELOCATABLE', get_option('relocatable'))
config_host_data.set('CONFIG_SAFESTACK', get_option('safe_stack'))
config_host_data.set('CONFIG_SDL', sdl.found())
config_host_data.set('CONFIG_SDL_IMAGE', sdl_image.found())
@@ -4054,6 +4055,7 @@ if 'simple' in get_option('trace_backends')
endif
summary_info += {'D-Bus display': dbus_display}
summary_info += {'QOM debugging': get_option('qom_cast_debug')}
+summary_info += {'Relocatable install': get_option('relocatable')}
summary_info += {'vhost-kernel support': have_vhost_kernel}
summary_info += {'vhost-net support': have_vhost_net}
summary_info += {'vhost-user support': have_vhost_user}
@@ -4356,3 +4358,21 @@ if host_arch == 'unknown' or not supported_oses.contains(targetos)
message('If you want to help supporting QEMU on this platform, please')
message('contact the developers at qemu-devel@nongnu.org.')
endif
+
+actually_reloc = get_option('relocatable')
+# check if get_relocated_path() is actually able to relocate paths
+if get_option('relocatable') and \
+ not (get_option('prefix') / get_option('bindir')).startswith(get_option('prefix') / '')
+ message()
+ warning('bindir not included within prefix, the installation will not be relocatable.')
+ actually_reloc = false
+endif
+if not actually_reloc and (targetos == 'windows' or get_option('relocatable'))
+ if targetos == 'windows'
+ message()
+ warning('Windows installs should usually be relocatable.')
+ endif
+ message()
+ message('QEMU will have to be installed under ' + get_option('prefix') + '.')
+ message('Use --disable-relocatable to remove this warning.')
+endif