config BR2_PACKAGE_LIBYANG
	bool "libyang"
	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # __sync_*_4 intrinsics
	depends on BR2_TOOLCHAIN_HAS_THREADS
	depends on !BR2_STATIC_LIBS
	select BR2_PACKAGE_PCRE2
	help
	  Libyang is YANG data modeling language parser and toolkit
	  written (and providing API) in C.

	  https://github.com/CESNET/libyang

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