chiark / gitweb /
meson: autodetect split-usr
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 1 Mar 2018 10:49:42 +0000 (11:49 +0100)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:59:10 +0000 (07:59 +0200)
Also move the status from "features" to the paths section. This is more of an
anti-feature.

meson.build
meson_options.txt

index 37b35c034f75ca6461864134c6bf528734d5a212..a71cd2a0ca04d29d3a8b696c87a27f119cca3e40 100644 (file)
@@ -70,7 +70,11 @@ m4_defines = []
 
 #####################################################################
 
-split_usr = get_option('split-usr')
+if get_option('split-usr') == 'auto'
+        split_usr = run_command('test', '-L', '/bin').returncode() != 0
+else
+        split_usr = get_option('split-usr') == 'true'
+endif
 conf.set10('HAVE_SPLIT_USR', split_usr)
 
 rootprefixdir = get_option('rootprefix')
@@ -3051,6 +3055,7 @@ run_target(
 status = [
         '@0@ @1@'.format(meson.project_name(), meson.project_version()),
 
+        'split /usr:                        @0@'.format(split_usr),
 #if 0 /// UNSUPPORTED by elogind
 #         'prefix directory:                  @0@'.format(prefixdir),
 #         'rootprefix directory:              @0@'.format(rootprefixdir),
@@ -3216,7 +3221,6 @@ foreach tuple : [
         ['html pages',       want_html],
         ['man page indices', want_man and have_lxml],
 #if 0 /// UNNEEDED by elogind
-#         ['split /usr',       conf.get('HAVE_SPLIT_USR') == 1],
 #         ['SysV compat'],
 #endif // 0
         ['utmp'],
index c08325567b9ae40ac896a779df774a05e2057c8c..e6696dea96c0ae4596cd7ced4ead9b777c1e67d7 100644 (file)
@@ -16,8 +16,8 @@
 # You should have received a copy of the GNU Lesser General Public License
 # along with elogind; If not, see <http://www.gnu.org/licenses/>.
 
-option('split-usr', type : 'boolean', value : false,
-       description : '''assume that /bin, /sbin aren't symlinks into /usr''')
+option('split-usr', type : 'combo', choices : ['auto', 'true', 'false'],
+       description : '''/bin, /sbin aren't symlinks into /usr''')
 option('rootlibdir', type : 'string',
        description : '''[/usr]/lib/x86_64-linux-gnu or such''')
 option('rootprefix', type : 'string',