build: add split-usr option

This commit is contained in:
William Hubbs 2021-09-06 15:22:28 -05:00
parent 444e44eb9d
commit f2362cc277
2 changed files with 12 additions and 3 deletions

View File

@ -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')

View File

@ -22,6 +22,9 @@ option('selinux', type : 'feature', value : 'auto',
description : 'enable SELinux support')
option('shell', type : 'string', value : '/bin/sh',
description : 'Default posix compatible shell')
option('split-usr', type : 'combo',
choices : ['auto', 'true', 'false'],
description : '''/bin, /sbin aren't symlinks into /usr''')
option('sysvinit', type : 'boolean', value : false,
description : 'enable SysVinit compatibility (linux only)')
option('termcap', type : 'combo',