1faad_opt = get_option('faad').require(gpl_allowed, error_message: ''' 2 Plugin faad explicitly required via options but GPL-licensed plugins disabled via options. 3 Pass option -Dgpl=enabled to Meson to allow GPL-licensed plugins to be built. 4 ''') 5 6if faad_opt.disabled() 7 faad_dep = dependency('', required: false) 8 subdir_done() 9endif 10 11faad_args = [ ] 12 13have_faad = cc.has_header_symbol('neaacdec.h', 'NeAACDecOpen') 14have_faad_2_7 = have_faad and cc.has_header_symbol('neaacdec.h', 'LATM') 15if have_faad and not have_faad_2_7 and faad_opt.enabled() 16 message('Found faad2, but too old (< v2.7.0)') 17endif 18 19faad_dep = cc.find_library('faad', required : faad_opt) 20 21if faad_dep.found() and have_faad_2_7 22 gstfaad = library('gstfaad', 23 'gstfaad.c', 24 c_args : gst_plugins_bad_args + [ '-DFAAD2_MINOR_VERSION=7', '-DFAAD_IS_NEAAC' ], 25 link_args : noseh_link_args, 26 include_directories : [configinc], 27 dependencies : [gstaudio_dep, gstpbutils_dep, gsttag_dep, faad_dep], 28 install : true, 29 install_dir : plugins_install_dir, 30 ) 31 pkgconfig.generate(gstfaad, install_dir : plugins_pkgconfig_install_dir) 32 plugins += [gstfaad] 33endif 34