Skip to content

Commit 2675413

Browse files
committed
meson: autodetect split-usr
Also move the status from "features" to the paths section. This is more of an anti-feature.
1 parent 649a5ff commit 2675413

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

meson.build

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ endif
5454

5555
#####################################################################
5656

57-
split_usr = get_option('split-usr')
57+
if get_option('split-usr') == 'auto'
58+
split_usr = run_command('test', '-L', '/bin').returncode() != 0
59+
else
60+
split_usr = get_option('split-usr') == 'true'
61+
endif
5862
conf.set10('HAVE_SPLIT_USR', split_usr)
5963

6064
rootprefixdir = get_option('rootprefix')
@@ -2738,6 +2742,7 @@ run_target(
27382742
status = [
27392743
'@0@ @1@'.format(meson.project_name(), meson.project_version()),
27402744

2745+
'split /usr: @0@'.format(split_usr),
27412746
'prefix directory: @0@'.format(prefixdir),
27422747
'rootprefix directory: @0@'.format(rootprefixdir),
27432748
'sysconf directory: @0@'.format(sysconfdir),
@@ -2874,7 +2879,6 @@ foreach tuple : [
28742879
['man pages', want_man],
28752880
['html pages', want_html],
28762881
['man page indices', want_man and have_lxml],
2877-
['split /usr', conf.get('HAVE_SPLIT_USR') == 1],
28782882
['SysV compat'],
28792883
['utmp'],
28802884
['ldconfig'],

meson_options.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
# You should have received a copy of the GNU Lesser General Public License
1717
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
1818

19-
option('split-usr', type : 'boolean', value : false,
20-
description : '''assume that /bin, /sbin aren't symlinks into /usr''')
19+
option('split-usr', type : 'combo', choices : ['auto', 'true', 'false'],
20+
description : '''/bin, /sbin aren't symlinks into /usr''')
2121
option('rootlibdir', type : 'string',
2222
description : '''[/usr]/lib/x86_64-linux-gnu or such''')
2323
option('rootprefix', type : 'string',

0 commit comments

Comments
 (0)