lkml.org 
[lkml]   [2018]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 5/5] kconfig: refactor ncurses package checks for building nconf
2018-05-21 8:41 GMT+09:00 Randy Dunlap <rdunlap@infradead.org>:
> On 05/20/2018 01:16 AM, Masahiro Yamada wrote:
>> Building nconf requires ncurses, but its presence is not checked.
>> Check and configure necessary packages by a shell script like the
>> other GUI frontends.
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>> ---
>>
>
>> diff --git a/scripts/kconfig/nconf-cfg.sh b/scripts/kconfig/nconf-cfg.sh
>> new file mode 100644
>> index 0000000..8eb7948
>> --- /dev/null
>> +++ b/scripts/kconfig/nconf-cfg.sh
>> @@ -0,0 +1,34 @@
>> +#!/bin/sh
>> +# SPDX-License-Identifier: GPL-2.0
>> +
>> +PKG="ncursesw menuw panelw"
>> +PKG2="ncurses menu panel"
>> +
>> +if pkg-config --exists $PKG; then
>> + echo libs=\"$(pkg-config --libs $PKG)\"
>> + exit 0
>> +fi
>> +
>> +if pkg-config --exists $PKG2; then
>> + echo libs=\"$(pkg-config --libs $PKG2)\"
>> + exit 0
>> +fi
>> +
>
> I guess this one needs clags, especially -I, like the mconf patch contains...



I thought so.

But, the current scripts/kconfig/Makefile
adds 'pkg-config --libs' to nconf,
but does nothing about 'pkg-config --cflags' for nconf.
Therefore, I kept the current behavior just in case.


The nconfig in the current version is not working for you, right?




>
>> +# Unfortunately, some distributions (e.g. openSUSE) cannot find ncurses
>> +# by pkg-config.
>> +if [ -f /usr/include/ncursesw/ncurses.h ]; then
>> + echo libs=\"-lncursesw -lmenuw -lpanelw\"
>> + exit 0
>> +fi
>> +
>> +if [ -f /usr/include/ncurses.h ]; then
>> + echo libs=\"-lncurses -lmenu -lpanel\"
>> + exit 0
>> +fi
>> +
>> +echo >&2 "*"
>> +echo >&2 "* Unable to find the ncurses."
>
> the ncurses package."
>
>> +echo >&2 "* Install ncurses (ncurses-devel or libncurses-dev"
>> +echo >&2 "* depending on your distribution)"
>
> distribution)."
>
>> +echo >&2 "*"
>> +exit 1
>>



--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2018-05-21 06:50    [W:0.076 / U:0.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site