-
Notifications
You must be signed in to change notification settings - Fork 1
/
meson.build
56 lines (44 loc) · 1.34 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
project('yasr', 'c',
version: '0.7.0',
license: 'LGPLv2+',
default_options: [
'buildtype=debugoptimized',
'warning_level=1',
'c_std=gnu99',
],
meson_version: '>= 0.47.0')
cc = meson.get_compiler('c')
host_system = host_machine.system()
conf = configuration_data()
conf.set('GETTEXT_PACKAGE', '"yasr"')
add_global_arguments([
'-I' + meson.build_root(), # config.h
], language: 'c')
prefix = get_option('prefix')
datadir = join_paths(prefix, get_option('datadir'))
pkgdatadir = join_paths(datadir, meson.project_name())
conf.set_quoted('PACKAGE_DATA_DIR', pkgdatadir)
localedir = join_paths(prefix, get_option('localedir'))
conf.set_quoted('LOCALEDIR', localedir)
foreach h : [ 'fcntl.h', 'sys/ioctl.h', 'sys/time.h', 'unistd.h', 'utmpx.h',
'pty.h', 'locale.h']
if cc.check_header(h)
conf.set('HAVE_@0@'.format(h.underscorify().to_upper()), 1)
endif
endforeach
openpty_dep = cc.find_library('util')
i18n = import('i18n')
xgettext = find_program('xgettext', required : true)
if xgettext.found()
conf.set('ENABLE_NLS', 1)
endif
speechd_dep = dependency('speech-dispatcher', required: false)
if speechd_dep.found()
conf.set('ENABLE_SPEECHD', 1)
endif
configure_file(output: 'config.h', configuration: conf)
subdir('yasr')
subdir('tools')
if xgettext.found()
subdir('po')
endif