diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2021-09-06 15:22:28 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2021-09-06 15:22:28 -0500 |
commit | f2362cc277023550b2482215b4a1cd7142639427 (patch) | |
tree | 692dc36c30463823a0b02c28aa13032be2ea024f /meson.build | |
parent | 444e44eb9da303c6614034a3558daceca15e0315 (diff) |
build: add split-usr option
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/meson.build b/meson.build index dc169b5d..75c225a2 100644 --- a/meson.build +++ b/meson.build @@ -66,10 +66,16 @@ else pkg_prefix = option_pkg_prefix endif -rootprefix = get_option('rootprefix') -if rootprefix == '' - rootprefix = '/' +if get_option('split-usr') == 'auto' + split_usr = run_command('test', '-L', '/bin').returncode() != 0 +else + split_usr = get_option('split-usr') == 'true' endif + +rootprefix_default = split_usr ? '/' : '/usr'A +rootprefix_path = get_option('rootprefix') +rootprefix = rootprefix_path != '' ? rootprefix_path : rootprefix_default + bindir = rootprefix / get_option('bindir') libdir = rootprefix / get_option('libdir') libexecdir = rootprefix / get_option('libexecdir') |