From: Christian Brauner Date: Mon, 13 Sep 2021 09:03:34 +0000 (+0200) Subject: build: add more global config variables X-Git-Tag: lxc-5.0.0~92^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcfe4e135d3776763940f2a2256e3c7905dff685;p=thirdparty%2Flxc.git build: add more global config variables Signed-off-by: Christian Brauner --- diff --git a/meson.build b/meson.build index 190b248a0..64fc5c3cd 100644 --- a/meson.build +++ b/meson.build @@ -40,6 +40,7 @@ prefixdir = get_option('prefix') if not prefixdir.startswith('/') error('Prefix is not absolute: "@0@"'.format(prefixdir)) endif +docdir = join_paths(prefixdir, get_option('docdir')) datadir = join_paths(prefixdir, get_option('datadir')) bindir = join_paths(prefixdir, get_option('bindir')) sbindir = join_paths(prefixdir, get_option('sbindir')) @@ -57,8 +58,10 @@ lxcpath = get_option('config-path') globalconfig = get_option('global-config') conf.set_quoted('BINDIR', bindir) +conf.set_quoted('DOCDIR', docdir) conf.set_quoted('SBINDIR', sbindir) conf.set_quoted('INCLUDEDIR', includedir) +conf.set_quoted('LOCALSTATEDIR', localstatedir) conf.set_quoted('LIBDIR', libdir) conf.set_quoted('LIBEXECDIR', libexecdir) conf.set_quoted('SYSCONFDIR', sysconfdir) @@ -74,22 +77,13 @@ conf.set_quoted('DATADIR', datadir) conf.set_quoted('LXCTEMPLATECONFIG', join_paths(datadir, 'lxc/config')) conf.set_quoted('LXCTEMPLATEDIR', join_paths(datadir, 'lxc/templates')) conf.set_quoted('LXCINITDIR', libexecdir) +conf.set_quoted('LXCHOOKDIR', join_paths(datadir, 'lxc/hooks')) +conf.set_quoted('LXCBINHOOKDIR', join_paths(libexecdir, 'lxc/hooks')) -# AS_AC_EXPAND(DATADIR, "$datadir") -# AS_AC_EXPAND(LOCALSTATEDIR, "$localstatedir") -# AS_AC_EXPAND(DOCDIR, "$docdir") # AS_AC_EXPAND(LXC_GENERATE_DATE, "$(date --utc --date=@${SOURCE_DATE_EPOCH:-$(date +%s)} '+%Y-%m-%d')") -# AS_AC_EXPAND(LXCPATH, "$with_config_path") -# AS_AC_EXPAND(LXC_GLOBAL_CONF, "$with_global_conf") # AS_AC_EXPAND(LXC_USERNIC_CONF, "$with_usernic_conf") # AS_AC_EXPAND(LXC_USERNIC_DB, "$with_usernic_db") # AS_AC_EXPAND(LXC_DISTRO_SYSCONF, "$distrosysconf") -# AS_AC_EXPAND(LXCHOOKDIR, "$datadir/lxc/hooks") -# AS_AC_EXPAND(LXCBINHOOKDIR, "$libexecdir/lxc/hooks") -# AS_AC_EXPAND(LXCINITDIR, "$libexecdir") -# -# # We need the install path so criu knows where to reference the hook scripts. -# AC_DEFINE_UNQUOTED([DATADIR], "$DATADIR", ["Prefix for shared files."]) cc = meson.get_compiler('c') pkgconfig = import('pkgconfig') diff --git a/meson_options.txt b/meson_options.txt index 874516e72..bab30ec6b 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -27,3 +27,6 @@ option('config-path', type : 'string', value : 'lib/lxc', option('global-config', type : 'string', value : 'lxc/lxc.conf', description : 'the rootfs mount directory') + +option('docdir', type : 'string', + description : 'documentation directory')