mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 04:31:50 +00:00
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@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
parent
7285996aa0
commit
be8af2d54a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user