config BR2_PACKAGE_JACK2
	bool "jack2"
	depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
	depends on BR2_USE_MMU # fork()
	depends on BR2_INSTALL_LIBSTDCPP
	depends on !BR2_STATIC_LIBS
	depends on BR2_TOOLCHAIN_HAS_SYNC_4
	select BR2_PACKAGE_LIBSAMPLERATE
	select BR2_PACKAGE_LIBSNDFILE
	select BR2_PACKAGE_ALSA_LIB
	select BR2_PACKAGE_ALSA_LIB_HWDEP
	select BR2_PACKAGE_ALSA_LIB_SEQ
	select BR2_PACKAGE_ALSA_LIB_RAWMIDI
	# Ensure we get at least one:
	select BR2_PACKAGE_JACK2_LEGACY if !BR2_PACKAGE_JACK2_DBUS
	help
	  JACK Audio Connection Kit (server and example clients).

	  JACK is a low-latency sound server, allowing multiple
	  applications to connect to one audio device, and to share
	  audio between themselves. This package contains the daemon
	  jackd as well as some example clients.

	  http://jackaudio.org/

if BR2_PACKAGE_JACK2

config BR2_PACKAGE_JACK2_LEGACY
	bool "classic jack2"
	help
	  Build and use jackd.

	  https://github.com/jackaudio/jackaudio.github.com/wiki/JackDbusPackaging

config BR2_PACKAGE_JACK2_DBUS
	bool "dbus jack2"
	depends on BR2_USE_WCHAR # dbus-python, python
	select BR2_PACKAGE_DBUS
	select BR2_PACKAGE_DBUS_PYTHON
	select BR2_PACKAGE_PYTHON3 if !BR2_PACKAGE_PYTHON # runtime
	select BR2_PACKAGE_PYTHON_PYEXPAT if BR2_PACKAGE_PYTHON # runtime
	select BR2_PACKAGE_PYTHON3_PYEXPAT if BR2_PACKAGE_PYTHON3 # runtime
	help
	  Build and use jackdbus.

	  https://github.com/jackaudio/jackaudio.github.com/wiki/JackDbusPackaging

endif

comment "jack2 needs a toolchain w/ threads, C++, dynamic library"
	depends on BR2_USE_MMU
	depends on BR2_TOOLCHAIN_HAS_SYNC_4
	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || \
		BR2_STATIC_LIBS
