[coreboot-gerrit] New patch to review for coreboot: 36f0faf kconfig/lxdialog: get ncurses CFLAGS with pkg-config
Stefan Reinauer (stefan.reinauer@coreboot.org)
gerrit at coreboot.org
Mon Apr 6 01:48:05 CEST 2015
Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9315
-gerrit
commit 36f0faff9a84d690acea1acf4c2966553ec21260
Author: Stefan Reinauer <stefan.reinauer at coreboot.org>
Date: Mon Apr 6 01:44:49 2015 +0200
kconfig/lxdialog: get ncurses CFLAGS with pkg-config
This makes "make menuconfig" also work on systems where ncurses is not
installed in a standard location (such as on NixOS).
This patch changes ccflags() so that it tries pkg-config first, and only
if pkg-config fails does it go back to the fallback/manual checks. This
is the same algorithm that ldflags() already uses.
Signed-off-by: Bjørn Forsman <bjorn.forsman at gmail.com>
Signed-off-by: Michal Marek <mmarek at suse.cz>
Change-Id: Ie2372ca35546c1fc2d6cf603614683312ee4ea4c
Signed-off-by: Stefan Reinauer <stefan.reinauer at coreboot.org>
---
util/kconfig/lxdialog/check-lxdialog.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/util/kconfig/lxdialog/check-lxdialog.sh b/util/kconfig/lxdialog/check-lxdialog.sh
index 2b845e6..78939da 100644
--- a/util/kconfig/lxdialog/check-lxdialog.sh
+++ b/util/kconfig/lxdialog/check-lxdialog.sh
@@ -21,7 +21,11 @@ ldflags()
# Where is ncurses.h?
ccflags()
{
- if [ -f /usr/include/ncursesw/curses.h ]; then
+ if pkg-config --cflags ncursesw 2>/dev/null; then
+ echo '-DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1'
+ elif pkg-config --cflags ncurses 2>/dev/null; then
+ echo '-DCURSES_LOC="<ncurses.h>"'
+ elif [ -f /usr/include/ncursesw/curses.h ]; then
echo '-I/usr/include/ncursesw -DCURSES_LOC="<curses.h>"'
echo ' -DNCURSES_WIDECHAR=1'
elif [ -f /usr/include/ncurses/ncurses.h ]; then
More information about the coreboot-gerrit
mailing list