From 1e86d616f52be9a33ffd8df86e0c6313b7d5e400 Mon Sep 17 00:00:00 2001 From: Arnaud Rebillout Date: Tue, 9 Oct 2018 10:31:16 +0700 Subject: [PATCH] meson: Add a sanity check to the prefix option Signed-off-by: Arnaud Rebillout --- meson.build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meson.build b/meson.build index 19fef1a..cd1dff8 100644 --- a/meson.build +++ b/meson.build @@ -28,7 +28,13 @@ soversion = 0 # current = minor * 100 + micro libversion = '@0@.@1@.0'.format(soversion, pa_version_minor.to_int() * 100 + pa_version_micro.to_int()) +# Paths + prefix = get_option('prefix') +if not prefix.startswith('/') + error('Prefix is not absolute: "@0@"'.format(prefix)) +endif + datadir = join_paths(prefix, get_option('datadir')) localstatedir = join_paths(prefix, get_option('localstatedir')) sysconfdir = join_paths(prefix, get_option('sysconfdir')) -- 2.7.4