config BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING_ARCH_SUPPORTS
	bool
	default y if BR2_aarch64 || BR2_arm || BR2_i386 || BR2_x86_64

config BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING
	bool "webrtc-audio-processing"
	depends on BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING_ARCH_SUPPORTS
	depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS
	depends on BR2_INSTALL_LIBSTDCPP
	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 # libabseil-cpp
	# pthread_condattr_setclock
	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
	depends on !BR2_STATIC_LIBS # libabseil-cpp
	select BR2_PACKAGE_LIBABSEIL_CPP
	help
	  AudioProcessing library based on Google's implementation of
	  WebRTC.

	  http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/

comment "webrtc-audio-processing needs a toolchain w/ C++, NPTL, dynamic library, gcc >= 8"
	depends on BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING_ARCH_SUPPORTS
	depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS
	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS_NPTL \
		|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_8
