config BR2_PACKAGE_LIBNETCONF2
	bool "libnetconf2"
	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libyang
	depends on BR2_TOOLCHAIN_HAS_THREADS
	depends on !BR2_STATIC_LIBS
	depends on BR2_USE_MMU
	select BR2_PACKAGE_LIBXCRYPT if BR2_TOOLCHAIN_USES_GLIBC
	select BR2_PACKAGE_LIBYANG
	help
	  libnetconf2 is a NETCONF library in C intended for building
	  NETCONF clients and servers.

	  https://github.com/CESNET/libnetconf2

if BR2_PACKAGE_LIBNETCONF2

config BR2_PACKAGE_LIBNETCONF2_SSH_TLS
	bool "SSH/TLS support"
	depends on BR2_USE_MMU # libssh
	depends on !BR2_STATIC_LIBS # libssh
	depends on BR2_TOOLCHAIN_HAS_THREADS # libssh
	select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_MBEDTLS
	select BR2_PACKAGE_LIBCURL
	select BR2_PACKAGE_LIBSSH
	select BR2_PACKAGE_LIBSSH_SERVER

comment "SSH/TLS support needs a toolchain w/ threads, dynamic library"
	depends on BR2_USE_MMU
	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS

endif

comment "libnetconf2 needs a toolchain w/ threads, dynamic library"
	depends on BR2_USE_MMU
	depends on BR2_TOOLCHAIN_HAS_SYNC_4
	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
