File: meson.build

package info (click to toggle)
faac 1.40-1
  • links: PTS, VCS
  • area: non-free
  • in suites:
  • size: 644 kB
  • sloc: ansic: 7,401; makefile: 3
file content (47 lines) | stat: -rw-r--r-- 1,210 bytes parent folder | download | duplicates (2)
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.40.0', 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