Currently libvirt favors /run instead of /var/run, but for local build run test, a prefix path is still needed to avoid interoperating with OS vendor provided binaries.
When 'system' option is specified, fixed path /run is honored. Fixes: e5299ddf86121d3c792ca271ffcb54900eb19dc3 Signed-off-by: Zhenzhong Duan <zhenzhong.d...@intel.com> --- v2: Take option `system` into consideration (Pavel) meson.build | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index bf4a245dd3..2762236f37 100644 --- a/meson.build +++ b/meson.build @@ -62,11 +62,16 @@ if get_option('system') endif localstatedir = '/var' sysconfdir = '/etc' + runstatedir = '/run' else prefix = get_option('prefix') libdir = prefix / get_option('libdir') localstatedir = prefix / get_option('localstatedir') sysconfdir = prefix / get_option('sysconfdir') + runstatedir = get_option('runstatedir') + if runstatedir == '' + runstatedir = prefix / 'run' + endif endif # if --prefix is /usr, don't use /usr/var for localstatedir or /usr/etc for @@ -80,11 +85,6 @@ if prefix == '/usr' endif endif -runstatedir = get_option('runstatedir') -if runstatedir == '' - runstatedir = '/run' -endif - initconfdir = get_option('initconfdir') if initconfdir == '' if (os_release.contains('alpine') or -- 2.34.1