1shm_sources = [ 2 'shmpipe.c', 3 'shmalloc.c', 4 'gstshm.c', 5 'gstshmsrc.c', 6 'gstshmsink.c', 7] 8 9if get_option('shm').disabled() 10 subdir_done() 11endif 12 13shm_deps = [] 14if ['darwin', 'ios'].contains(host_system) or host_system.endswith('bsd') 15 rt_dep = [] 16 shm_enabled = true 17else 18 rt_dep = cc.find_library ('rt', required: false) 19 shm_enabled = rt_dep.found() 20endif 21 22if shm_enabled 23 shm_enabled = cc.has_header('sys/socket.h') 24elif get_option('shm').enabled() 25 error('shm plugin enabled but librt not found') 26endif 27 28if not shm_enabled and get_option('shm').enabled() 29 error('shm plugin enabled but socket.h not found') 30endif 31 32if shm_enabled 33 gstshm = library('gstshm', 34 shm_sources, 35 c_args : gst_plugins_bad_args + ['-DSHM_PIPE_USE_GLIB'], 36 include_directories : [configinc], 37 dependencies : [gstbase_dep, rt_dep], 38 install : true, 39 install_dir : plugins_install_dir, 40 ) 41 pkgconfig.generate(gstshm, install_dir : plugins_pkgconfig_install_dir) 42endif 43