1 lame_option = get_option('lame')
2 lame_dep = cc.find_library('mp3lame', required : lame_option)
3 have_lame = lame_dep.found()
5 # TODO: https://github.com/mesonbuild/meson/issues/3940
7 have_lame = cc.has_header_symbol('lame/lame.h', 'lame_init')
8 if not have_lame and lame_option.enabled()
9 error('Found libmp3lame but lame.h was not usable')
14 lame_extra_c_args = []
15 if cc.has_header_symbol('lame/lame.h', 'lame_set_VBR_quality')
16 lame_extra_c_args += ['-DHAVE_LAME_SET_VBR_QUALITY']
18 if cc.has_header_symbol('lame/lame.h', 'MEDIUM')
19 lame_extra_c_args += ['-DGSTLAME_PRESET']
21 lame = library('gstlame',
22 ['gstlamemp3enc.c', 'plugin.c'],
23 c_args : gst_plugins_good_args + lame_extra_c_args,
24 include_directories : [configinc, libsinc],
25 dependencies : [gstaudio_dep, lame_dep],
27 install_dir : plugins_install_dir,
29 pkgconfig.generate(lame, install_dir : plugins_pkgconfig_install_dir)