diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-01-11 14:47:13 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-01-15 00:39:15 +0530 |
commit | 532950133459b627b2414eef05b32bd23eeb78a7 (patch) | |
tree | 07e4fa737386b909e8023bf3a05f968ae518ec07 | |
parent | a9c115adebeaa4f35f27953b1cb94881912e5c00 (diff) | |
download | gstreamer-plugins-bad-532950133459b627b2414eef05b32bd23eeb78a7.tar.gz |
ipcpipeline: Rework compiler checks
`pipe()` isn't used since 15927b6511bc8304ae144a45c9fbfca88e5dd641,
and `socketpair()` from `#include <sys/socket.h>` is used only in the
examples. In practice, you can use probably also use anything that
allows you to create fd pairs, such as named pipes or anonymous pipes.
We use the cross-platform GstPollFD API in the plugin.
-rw-r--r-- | sys/ipcpipeline/meson.build | 34 | ||||
-rw-r--r-- | tests/examples/ipcpipeline/meson.build | 13 |
2 files changed, 21 insertions, 26 deletions
diff --git a/sys/ipcpipeline/meson.build b/sys/ipcpipeline/meson.build index 3355c797a..6a7c1a328 100644 --- a/sys/ipcpipeline/meson.build +++ b/sys/ipcpipeline/meson.build @@ -10,28 +10,12 @@ if get_option('ipcpipeline').disabled() subdir_done() endif -have_socket_h = cc.has_header('sys/socket.h') -if not have_socket_h and get_option('ipcpipeline').enabled() - error('ipcpipeline plugin enabled but socket.h not found') -endif -have_pipe = cc.has_function('pipe') -if not have_pipe and get_option('ipcpipeline').enabled() - error('ipcpipeline plugin enabled but pipe() not found') -endif -have_socketpair = cc.has_function('socketpair') -if not have_socketpair and get_option('ipcpipeline').enabled() - error('ipcpipeline plugin enabled but socketpair() not found') -endif - -build_ipcpipeline = have_socket_h and have_pipe and have_socketpair -if build_ipcpipeline - gstipcpipeline = library('gstipcpipeline', - ipcpipeline_sources, - c_args : gst_plugins_bad_args, - include_directories : [configinc], - dependencies : [gstbase_dep], - install : true, - install_dir : plugins_install_dir, - ) - pkgconfig.generate(gstipcpipeline, install_dir : plugins_pkgconfig_install_dir) -endif +gstipcpipeline = library('gstipcpipeline', + ipcpipeline_sources, + c_args : gst_plugins_bad_args, + include_directories : [configinc], + dependencies : [gstbase_dep], + install : true, + install_dir : plugins_install_dir, +) +pkgconfig.generate(gstipcpipeline, install_dir : plugins_pkgconfig_install_dir) diff --git a/tests/examples/ipcpipeline/meson.build b/tests/examples/ipcpipeline/meson.build index 03ca19694..73583e636 100644 --- a/tests/examples/ipcpipeline/meson.build +++ b/tests/examples/ipcpipeline/meson.build @@ -1,4 +1,15 @@ -if get_option('ipcpipeline').disabled() or not build_ipcpipeline +if get_option('ipcpipeline').disabled() + subdir_done() +endif + +build_ipcpipeline_example = cc.has_header('sys/socket.h') +foreach f : ['kill', 'socketpair', 'fcntl', 'fork'] + if build_ipcpipeline_example + build_ipcpipeline_example = cc.has_function(f) + endif +endforeach + +if not build_ipcpipeline_example subdir_done() endif |