diff --git a/package/bctoolbox/Config.in b/package/bctoolbox/Config.in index 834f6e2a6a..e9e69205f8 100644 --- a/package/bctoolbox/Config.in +++ b/package/bctoolbox/Config.in @@ -2,11 +2,13 @@ config BR2_PACKAGE_BCTOOLBOX bool "bctoolbox" depends on BR2_INSTALL_LIBSTDCPP depends on BR2_TOOLCHAIN_HAS_THREADS - select BR2_PACKAGE_MBEDTLS # mbedtls is preferred over polarssl help Utilities library used by Belledonne Communications softwares like belle-sip, mediastreamer2 and linphone. + Select BR2_PACKAGE_MBEDTLS (preferred) or + BR2_PACKAGE_POLARSSL for crypto support. + https://github.com/BelledonneCommunications/bctoolbox comment "bctoolbox needs a toolchain w/ C++, threads" diff --git a/package/bctoolbox/bctoolbox.mk b/package/bctoolbox/bctoolbox.mk index 64c67792a7..5eea0575fc 100644 --- a/package/bctoolbox/bctoolbox.mk +++ b/package/bctoolbox/bctoolbox.mk @@ -17,6 +17,22 @@ BCTOOLBOX_CONF_OPTS = \ -DENABLE_TESTS=OFF \ -DGIT_EXECUTABLE=OFF +# bctoolbox can be build with mbedTLS or PolarSSL support. If both +# libraries are present, mbedTLS is preferred over PolarSSL. +ifeq ($(BR2_PACKAGE_MBEDTLS),y) +BCTOOLBOX_DEPENDENCIES += mbedtls +BCTOOLBOX_CONF_OPTS += -DENABLE_MBEDTLS=ON +else +BCTOOLBOX_CONF_OPTS += -DENABLE_MBEDTLS=OFF +endif + +ifeq ($(BR2_PACKAGE_POLARSSL),y) +BCTOOLBOX_DEPENDENCIES += polarssl +BCTOOLBOX_CONF_OPTS += -DENABLE_POLARSSL=ON +else +BCTOOLBOX_CONF_OPTS += -DENABLE_POLARSSL=OFF +endif + ifeq ($(BR2_STATIC_LIBS),y) BCTOOLBOX_CONF_OPTS += -DENABLE_SHARED=OFF -DENABLE_STATIC=ON else ifeq ($(BR2_SHARED_STATIC_LIBS),y)