From 1fa24b0be3b3fd8f3259d48b34dcefe2810b04a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 23 Jun 2017 19:23:52 +0100 Subject: [PATCH] meson: build oss plugin https://bugzilla.gnome.org/show_bug.cgi?id=784134 --- sys/meson.build | 4 ++-- sys/oss/meson.build | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 sys/oss/meson.build diff --git a/sys/meson.build b/sys/meson.build index 30761f0fbe..3a2f702013 100644 --- a/sys/meson.build +++ b/sys/meson.build @@ -1,9 +1,9 @@ +subdir('directsound') +subdir('oss') subdir('v4l2') subdir('ximage') -subdir('directsound') # FIXME: Implement these -#subdir('oss') #subdir('oss4') #subdir('osxaudio') #subdir('osxvideo') diff --git a/sys/oss/meson.build b/sys/oss/meson.build new file mode 100644 index 0000000000..1176e78b45 --- /dev/null +++ b/sys/oss/meson.build @@ -0,0 +1,28 @@ +oss_header_locations = [ + # Linux and newer BSD versions + ['sys/soundcard.h', 'HAVE_OSS_INCLUDE_IN_SYS', 'OSS includes are in sys/'], + # Some old BSD versions and also newer OpenBSD versions + ['soundcard.h', 'HAVE_OSS_INCLUDE_IN_ROOT', 'OSS includes are in root'], + # Some old BSD versions + ['machine/soundcard.h', 'HAVE_OSS_INCLUDE_IN_MACHINE', 'OSS includes are in machine/'], +] + +have_oss = false +foreach hdr : oss_header_locations + if not have_oss + if cc.has_header(hdr[0]) + cdata.set(hdr[1], 1, description: hdr[2]) + have_oss = true + endif + endif +endforeach + +if have_oss + library('gstossaudio', + 'gstossaudio.c', 'gstosshelper.c', 'gstosssink.c', 'gstosssrc.c', + c_args : gst_plugins_good_args, + include_directories : [configinc, libsinc], + dependencies : [gstaudio_dep, gstbase_dep], + install : true, + install_dir : plugins_install_dir) +endif