]> git.sur5r.net Git - tio/blob - meson.build
New upstream version 1.34
[tio] / meson.build
1 project('tio', 'c',
2     version : '1.34',
3     license : [ 'GPL-2'],
4     meson_version : '>= 0.53.2',
5     default_options : [ 'warning_level=2', 'buildtype=release', 'c_std=gnu99' ]
6 )
7
8 # The tag date of the project_version(), update when the version bumps.
9 version_date = '2022-02-15'
10
11 # Test for dynamic baudrate configuration interface
12 compiler = meson.get_compiler('c')
13 enable_setspeed2 = false
14 if compiler.check_header('asm-generic/ioctls.h')
15   enable_setspeed2 = compiler.has_header_symbol('asm-generic/ioctls.h', 'TCGETS2')
16 endif
17
18 # Test for supported baudrates
19 test_baudrates = [
20     0,
21     50,
22     75,
23     110,
24     134,
25     150,
26     200,
27     300,
28     600,
29     1200,
30     1800,
31     2400,
32     4800,
33     7200,
34     9600,
35     14400,
36     19200,
37     28800,
38     38400,
39     57600,
40     76800,
41     115200,
42     230400,
43     460800,
44     500000,
45     576000,
46     921600,
47     1000000,
48     1152000,
49     1500000,
50     2000000,
51     2500000,
52     3000000,
53     3500000,
54     4000000 ]
55
56 baudrates = ''
57 baudrate_cases = ''
58 foreach rate : test_baudrates
59   baudrate = rate.to_string()
60   value = compiler.get_define('B' + baudrate, prefix: '#include <termios.h>')
61   if value != ''
62     baudrates = baudrates + baudrate + ' '
63     baudrate_cases = baudrate_cases + ' case ' + baudrate + ': baudrate = B' + baudrate + '; break;'
64   endif
65 endforeach
66
67 subdir('src')
68 subdir('man')