1ladspa_sources = [
2  'gstladspa.c',
3  'gstladspafilter.c',
4  'gstladspasource.c',
5  'gstladspasink.c',
6  'gstladspautils.c',
7]
8
9ladspa_cargs = []
10
11if get_option('ladspa').disabled()
12  subdir_done()
13endif
14
15# This is an optional dep, but we make it optional only in auto mode
16lrdf_dep = dependency('lrdf', required : get_option('ladspa'))
17if lrdf_dep.found()
18  ladspa_cargs = ['-DHAVE_LRDF']
19endif
20
21have_ladspa_h = cc.has_header('ladspa.h')
22if not have_ladspa_h and get_option('ladspa').enabled()
23  error('ladspa plugin is enabled but ladspa.h not found')
24endif
25
26if have_ladspa_h
27  gstladspa = library('gstladspa',
28    ladspa_sources,
29    c_args : gst_plugins_bad_args + ladspa_cargs,
30    link_args : noseh_link_args,
31    include_directories : [configinc, libsinc],
32    dependencies : [gstaudio_dep, gstbase_dep, gmodule_dep, lrdf_dep, libm],
33    install : true,
34    install_dir : plugins_install_dir,
35  )
36  pkgconfig.generate(gstladspa, install_dir : plugins_pkgconfig_install_dir)
37endif
38