comment "armadillo needs a toolchain w/ C++, gcc >= 8"
	depends on BR2_PACKAGE_OPENBLAS_ARCH_SUPPORTS
	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_8

comment "armadillo needs a toolchain w/ fortran, C++, gcc >= 8"
	depends on !BR2_PACKAGE_OPENBLAS_ARCH_SUPPORTS # otherwise, see comment above
	depends on BR2_PACKAGE_LAPACK_ARCH_SUPPORTS
	depends on !BR2_TOOLCHAIN_HAS_FORTRAN || !BR2_INSTALL_LIBSTDCPP
	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8

config BR2_PACKAGE_ARMADILLO
	bool "armadillo"
	depends on BR2_PACKAGE_OPENBLAS_ARCH_SUPPORTS || \
		(BR2_PACKAGE_LAPACK_ARCH_SUPPORTS && BR2_TOOLCHAIN_HAS_FORTRAN)
	depends on BR2_INSTALL_LIBSTDCPP
	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 # armadillo requires gcc >= 8.1
	help
	  Armadillo: An Open Source C++ Linear Algebra Library for
	  Fast Prototyping and Computationally Intensive Experiments.

	  http://arma.sourceforge.net/

if BR2_PACKAGE_ARMADILLO

choice
	prompt "BLAS implementation"

config BR2_PACKAGE_ARMADILLO_OPENBLAS
	bool "openblas"
	depends on BR2_PACKAGE_OPENBLAS_ARCH_SUPPORTS
	select BR2_PACKAGE_OPENBLAS

config BR2_PACKAGE_ARMADILLO_LAPACK
	bool "lapack"
	depends on BR2_PACKAGE_LAPACK_ARCH_SUPPORTS && BR2_TOOLCHAIN_HAS_FORTRAN
	select BR2_PACKAGE_LAPACK

endchoice

endif
