diff --git a/package/powertop/Config.in b/package/powertop/Config.in index f157f4618a..5ba83b3c23 100644 --- a/package/powertop/Config.in +++ b/package/powertop/Config.in @@ -4,6 +4,7 @@ config BR2_PACKAGE_POWERTOP depends on !BR2_bfin # libnl dependency depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_WCHAR select BR2_PACKAGE_NCURSES select BR2_PACKAGE_PCIUTILS select BR2_PACKAGE_LIBNL @@ -13,6 +14,6 @@ config BR2_PACKAGE_POWERTOP https://01.org/powertop/ -comment "powertop needs a toolchain w/ threads" +comment "powertop needs a toolchain w/ threads, wchar" depends on !BR2_bfin - depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR diff --git a/package/powertop/powertop.mk b/package/powertop/powertop.mk index 331edc9f5d..87da5a4051 100644 --- a/package/powertop/powertop.mk +++ b/package/powertop/powertop.mk @@ -18,4 +18,12 @@ POWERTOP_DEPENDENCIES += gettext POWERTOP_CONF_ENV += LIBS='-lintl' endif +# Help powertop at finding the right ncurses library depending on +# which one is available. +ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y) +POWERTOP_CONF_ENV += ac_cv_search_delwin="-lncursesw" +else +POWERTOP_CONF_ENV += ac_cv_search_delwin="-lncurses" +endif + $(eval $(autotools-package))