]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
build: add more global config variables
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 13 Sep 2021 09:03:34 +0000 (11:03 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 13 Sep 2021 09:03:34 +0000 (11:03 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
meson.build
meson_options.txt

index 190b248a0efd43e81642ab9421ac2c11a3457e8f..64fc5c3cdc86fb74f5a6580a0fb22fcc5f07128a 100644 (file)
@@ -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')
index 874516e7240403258f2dde3de404b7297e9beecf..bab30ec6b29aa6f3c240422f6fca8efb569666c9 100644 (file)
@@ -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')