• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1oss_header_locations = [
2  # Linux and newer BSD versions
3  ['sys/soundcard.h', 'HAVE_OSS_INCLUDE_IN_SYS', 'OSS includes are in sys/'],
4  # Some old BSD versions and also newer OpenBSD versions
5  ['soundcard.h', 'HAVE_OSS_INCLUDE_IN_ROOT', 'OSS includes are in root'],
6  # Some old BSD versions
7  ['machine/soundcard.h', 'HAVE_OSS_INCLUDE_IN_MACHINE', 'OSS includes are in machine/'],
8]
9
10have_oss = false
11oss_option = get_option('oss')
12if not oss_option.disabled()
13  foreach hdr : oss_header_locations
14    if not have_oss
15      if cc.has_header(hdr[0])
16        cdata.set(hdr[1], 1, description: hdr[2])
17        have_oss = true
18      endif
19    endif
20  endforeach
21
22  if not have_oss and oss_option.enabled()
23    error('OSS plugin was enabled but soundcard.h was not found')
24  endif
25endif
26
27if have_oss
28  library('gstossaudio',
29    'gstossaudio.c', 'gstosshelper.c', 'gstosssink.c', 'gstosssrc.c',
30    c_args : gst_plugins_good_args,
31    include_directories : [configinc, libsinc],
32    dependencies : [gstaudio_dep, gstbase_dep],
33    install : true,
34    install_dir : plugins_install_dir)
35endif
36