'kresc.c',
]
+if get_option('client')
-# client dependencies
-skip_client = false
-
-libedit = dependency('libedit', required: false)
-if not libedit.found()
- # TODO why call find_library? osx workaround?
- libedit = meson.get_compiler('c').find_library('edit', required: false)
+ # client dependencies
+ libedit = dependency('libedit', required: false)
if not libedit.found()
- skip_client = true
- message('kresc client: libedit not found')
+ # TODO why call find_library? osx workaround?
+ libedit = meson.get_compiler('c').find_library('edit')
endif
-endif
-# build
-if skip_client
- warning('kresc client: skipping build')
-else
+ # build
kresc = executable(
'kresc',
kresc_src,
'zonefile',
]
-embed_lua = generator(
- find_program('../../scripts/embed-lua.sh'),
- arguments: ['@INPUT@'],
- output: '@BASENAME@.inc',
- capture: true,
-)
-kresd_lua = embed_lua.process(
- 'sandbox.lua',
- 'config.lua',
- preserve_path_from: meson.source_root(),
-)
+if get_option('daemon')
+ # dependencies for embedding lua
+ xxd = find_program('xxd', required: false)
+ if not xxd.found()
+ hexdump = find_program('hexdump')
+ endif
+
+ embed_lua = generator(
+ find_program('../../scripts/embed-lua.sh'),
+ arguments: ['@INPUT@'],
+ output: '@BASENAME@.inc',
+ capture: true,
+ )
+
+ kresd_lua = embed_lua.process(
+ 'sandbox.lua',
+ 'config.lua',
+ preserve_path_from: meson.source_root(),
+ )
+endif
]
+subdir('lua')
+
+
lib_suffix = '.so'
# TODO seek&destroy LIBEXT
if host_machine.system() == 'darwin'
endif
-# daemon dependencies
-skip_daemon = false
+if get_option('daemon')
+ # daemon dependencies
+ luajit = dependency('luajit')
-luajit = dependency('luajit', required: false)
-if not luajit.found()
- skip_daemon = true
- message('kresd daemon: luajit not found')
-endif
-
-xxd = find_program('xxd', required: false)
-if not xxd.found()
- hexdump = find_program('hexdump', required: false)
- if not hexdump.found()
- skip_daemon = true
- message('kresd daemon: neither xxd nor hexdump found')
+ # optional dependencies
+ ## systemd socket activation
+ libsystemd = dependency('libsystemd', version: '>=227', required: false)
+ if libsystemd.found()
+ c_args += ['-DHAS_SYSTEMD']
endif
-endif
-
-
-# optional dependencies
-
-## systemd socket activation
-libsystemd = dependency('libsystemd', version: '>=227', required: false)
-if libsystemd.found()
- c_args += ['-DHAS_SYSTEMD']
-endif
-
-
-subdir('lua')
-
-# build
-if skip_daemon
- warning('kresd daemon: skipping build')
-else
+ # build
kresd = executable(
'kresd',
kresd_sources, kresd_lua,
# name_prefix: '',
#)
-library(
- 'stats',
- ['modules/stats/stats.c'],
- dependencies: [
- contrib_dep,
- libkres_dep,
- luajit,
- ],
- install: true,
- install_dir: modules_dir,
- name_prefix: '',
-)
+#library(
+# 'stats',
+# ['modules/stats/stats.c'],
+# dependencies: [
+# contrib_dep,
+# libkres_dep,
+# luajit,
+# ],
+# install: true,
+# install_dir: modules_dir,
+# name_prefix: '',
+#)
# TODO: dnstap
option('cookies', type: 'boolean', value: false, description: 'Support for DNS Cookies.')
+option('client', type : 'boolean', value : true, description: 'kresc client binary')
+option('daemon', type: 'boolean', value: true, description: 'kresd daemon binary')