2018-07-31 21:48:58 +00:00
|
|
|
have_oss4 = false
|
2018-07-25 02:05:28 +00:00
|
|
|
oss4_option = get_option('oss4')
|
|
|
|
if not oss4_option.disabled()
|
2018-07-31 21:48:58 +00:00
|
|
|
have_oss4 = true
|
2018-07-25 02:05:28 +00:00
|
|
|
message('Checking headers needed for Open Sound System 4 plugin...')
|
|
|
|
foreach hdr : ['fcntl.h', 'sys/ioctl.h', 'sys/stat.h', 'sys/types.h']
|
2018-07-31 21:48:58 +00:00
|
|
|
if have_oss4 and not cc.has_header(hdr)
|
|
|
|
have_oss4 = false
|
2017-06-23 18:35:28 +00:00
|
|
|
endif
|
2018-07-25 02:05:28 +00:00
|
|
|
endforeach
|
|
|
|
|
|
|
|
if not have_oss4 and oss4_option.enabled()
|
|
|
|
error('OSS4 plugin was enabled but headers were not found')
|
2017-06-23 18:35:28 +00:00
|
|
|
endif
|
2018-07-25 02:05:28 +00:00
|
|
|
endif
|
2017-06-23 18:35:28 +00:00
|
|
|
|
|
|
|
if have_oss4
|
|
|
|
message('Required headers found, building Open Sound System 4 plugin.')
|
|
|
|
|
|
|
|
library('gstoss4',
|
|
|
|
'oss4-audio.c', 'oss4-property-probe.c', 'oss4-sink.c', 'oss4-source.c',
|
|
|
|
c_args : gst_plugins_good_args,
|
|
|
|
include_directories : [configinc, libsinc],
|
|
|
|
dependencies : [gstaudio_dep, gstbase_dep],
|
|
|
|
install : true,
|
|
|
|
install_dir : plugins_install_dir)
|
|
|
|
else
|
|
|
|
message('Not building Open Sound System 4 plugin, required headers not found.')
|
|
|
|
endif
|