project('faac', 'c', version: '1.50.0', default_options: [ 'default_library=both', 'buildtype=release', 'warning_level=1', 'c_std=gnu99,c99', 'b_lto=true' ]) 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'] config_h.set('HAVE_' + h.underscorify().to_upper(), cc.has_header(h)) endforeach 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 config_h.set('MAX_CHANNELS', get_option('max-channels')) 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