forked from knik0/faac
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeson.build
More file actions
47 lines (32 loc) · 1.18 KB
/
meson.build
File metadata and controls
47 lines (32 loc) · 1.18 KB
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
project('faac', 'c', version: '1.31.1', default_options: ['default_library=both'])
add_global_arguments('-DHAVE_CONFIG_H', language: 'c')
config_h = configuration_data()
config_h.set_quoted('PACKAGE', meson.project_name())
config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
cc = meson.get_compiler('c')
foreach h: ['getopt.h', 'immintrin.h', 'stdint.h', 'sys/time.h', 'sys/types.h']
config_h.set('HAVE_' + h.underscorify().to_upper(), cc.has_header(h))
endforeach
config_h.set('HAVE_STRCASECMP', cc.has_function('strcasestr'))
libm = cc.find_library('m', required: false)
cpu_family = target_machine.cpu_family()
config_h.set('HAVE_SSE2', (cpu_family in ['x86', 'x86_64']) and config_h.get('HAVE_IMMINTRIN_H'))
if get_option('floating-point') == 'double'
config_h.set('FAAC_PRECISION_DOUBLE', 1)
else
config_h.set('FAAC_PRECISION_SINGLE', 1)
endif
c_args = []
if cc.get_argument_syntax() == 'msvc'
c_args += ['-DWIN32', '-DNDEBUG', '-D_WINDOWS', '-D_USRDLL', '-DLIBFAAC_DLL_EXPORTS']
endif
configure_file(
output: 'config.h',
configuration: config_h
)
subdir('docs')
subdir('include')
subdir('libfaac')
if get_option('frontend')
subdir('frontend')
endif