1if get_option('a52dec').disabled()
2  subdir_done()
3endif
4
5a52_dep = cc.find_library('a52', required : get_option('a52dec'))
6have_a52_h = cc.has_header_symbol('a52dec/a52.h', 'a52_init', prefix : '#include <stdint.h>')
7if not have_a52_h and get_option('a52dec').enabled()
8  error('a52dec plugin enabled but a52.h not found')
9endif
10
11if a52_dep.found() and have_a52_h
12  a52dec = library('gsta52dec',
13    'gsta52dec.c',
14    c_args : ugly_args,
15    include_directories : [configinc],
16    dependencies : [gstaudio_dep, orc_dep, a52_dep],
17    install : true,
18    install_dir : plugins_install_dir,
19  )
20  pkgconfig.generate(a52dec, install_dir : plugins_pkgconfig_install_dir)
21endif
22