~emersion/mrsh

a40f49c9bd6712f8a73725bcd19db70af307825f — emersion 2 years ago ffdd647
Add meson option for readline
3 files changed, 16 insertions(+), 2 deletions(-)

M .builds/archlinux.yml
M meson.build
A meson_options.txt
M .builds/archlinux.yml => .builds/archlinux.yml +4 -0
@@ 14,6 14,10 @@ tasks:
  - test: |
      cd mrsh
      ninja -C build test
  - build-no-readline: |
      cd mrsh
      meson configure build -Dreadline=disabled
      ninja -C build
triggers:
  - action: email
    condition: failure

M meson.build => meson.build +5 -2
@@ 17,7 17,10 @@ add_project_arguments('-Wno-missing-field-initializers', language: 'c')

cc = meson.get_compiler('c')

readline = cc.find_library('readline', required: false)
readline = cc.find_library(
	'readline',
	required: get_option('readline') == 'enabled',
)

mrsh_inc = include_directories('include')



@@ 96,7 99,7 @@ shell_deps = [mrsh]
shell_files = [
	'main.c'
]
if readline.found()
if readline.found() and get_option('readline') != 'disabled'
	shell_deps += [readline]
	shell_files += ['frontend/readline.c']
else

A meson_options.txt => meson_options.txt +7 -0
@@ 0,0 1,7 @@
option(
	'readline',
	type: 'combo',
	choices: ['auto', 'enabled', 'disabled'],
	value: 'auto',
	description: 'Enable improved interactive interface via readline',
)