8 if get_option('sctp').disabled()
12 sctp_platform_deps = []
14 found_system_usrsctp = false
16 if not get_option('sctp-internal-usrsctp').enabled()
17 sctp_dep = cc.find_library('usrsctp', required: false)
18 sctp_header = cc.has_header('usrsctp.h')
19 if host_system == 'windows'
20 sctp_platform_deps += [cc.find_library('ws2_32')]
23 found_system_usrsctp = sctp_dep.found() and sctp_header
25 if get_option('sctp-internal-usrsctp').disabled() and not found_system_usrsctp
26 if get_option('sctp').enabled()
27 error('sctp plugin enabled but could not find libusrsctp or usrsctp.h, and internal libusrsctp disabled')
29 message('Could not find libusrsctp or usrsctp.h, and internal libusrsctp disabled - not building sctp plugin')
35 if not found_system_usrsctp
36 message('Using internal libusrsctp')
38 sctp_dep = usrsctp_dep
40 if get_option('sctp').enabled() and not sctp_dep.found()
41 error('sctp plugin enabled but could not find system libusrsctp or configure internal libusrsctp')
45 if not gst_debug_disabled
46 sctp_args = ['-DSCTP_DEBUG']
51 if sctp_dep.found() and sctp_header
52 gstsctp = library('gstsctp',
54 c_args : gst_plugins_bad_args + sctp_args,
55 include_directories : [configinc],
56 dependencies : [sctp_dep, gst_dep, gstbase_dep, gstsctp_dep, sctp_platform_deps],
58 install_dir : plugins_install_dir,
60 pkgconfig.generate(gstsctp, install_dir : plugins_pkgconfig_install_dir)