Skip to contentSkip to conversation

Pull request for branch yem-kconfig-rc-fixes

GIT PULL In review Yann E. MORIN 2 participants 7 messages Mar 7, 2013 – Mar 22, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello Michal, All!

Michal, please, pull to -rc-fixes, these two changes by Justin to fix ncurses-based kconfig frontends (mconf & nconf) compilation on systems where ncurses was built with a separate terminfo library.

The following changes since commit e3900e74f26fc924c8e9e2a922bd40369b0bb517:

Merge branch 'kbuild/rc-fixes' into kbuild/kconfig (2013-02-25 21:51:57 +0100)

are available in the git repository at:

git://gitorious.org/linux-kconfig/linux-kconfig.git yem-kconfig-rc-fixes

Justin Lecher (2):
menuconfig: optionally use pkg-config to detect ncurses libs
kconfig: optionally use pkg-config to detect ncurses libs

 scripts/kconfig/Makefile                   |    4 +++-
 scripts/kconfig/lxdialog/check-lxdialog.sh |    2 ++
 2 files changed, 5 insertions(+), 1 deletions(-)

Regards,
Yann E. MORIN

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH 1/2 menuconfig: optionally use pkg-config to detect ncurses libs

From: Justin Lecher <[email protected]>

When building ncurses with --with-termlib several symbols get moved from libncurses.so to libtinfo.so. Thus when linking with libncurses.so, one additionally needs to link with libtinfo.so.

The ncurses pkg-config module will be used to detect the necessary libs for linking. If not available the old heuristic for detection of the ncurses libs will be used.

---
 scripts/kconfig/lxdialog/check-lxdialog.sh |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
scripts/kconfig/lxdialog/check-lxdialog.sh +2 -0
index 8078813..782d200 100644
@@ -4,6 +4,8 @@
 # What library to link
 ldflags()
 {
+	pkg-config --libs ncursesw 2>/dev/null && exit
+	pkg-config --libs ncurses 2>/dev/null && exit
 	for ext in so a dll.a dylib ; do
 		for lib in ncursesw ncurses curses ; do
 			$cc -print-file-name=lib${lib}.${ext} | grep -q /
Signature · 1 line
1.7.2.5
#2 lore raw

Re: [PATCH 1/2] menuconfig: optionally use pkg-config to detect ncurses libs

Dne 7.3.2013 19:20, Yann E. MORIN napsal(a):

Quoted 22 lines

From: Justin Lecher <[email protected]>

When building ncurses with --with-termlib several symbols get moved from libncurses.so to libtinfo.so. Thus when linking with libncurses.so, one additionally needs to link with libtinfo.so.

The ncurses pkg-config module will be used to detect the necessary libs for linking. If not available the old heuristic for detection of the ncurses libs will be used.

---
 scripts/kconfig/lxdialog/check-lxdialog.sh |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
scripts/kconfig/lxdialog/check-lxdialog.sh +0 -0
index 8078813..782d200 100644

scripts/kconfig/lxdialog/check-lxdialog.sh line 10

Quoted 7 lines
scripts/kconfig/lxdialog/check-lxdialog.sh +2 -0
@@ -4,6 +4,8 @@
 # What library to link
 ldflags()
 {
+	pkg-config --libs ncursesw 2>/dev/null && exit
+	pkg-config --libs ncurses 2>/dev/null && exit
 	for ext in so a dll.a dylib ; do
 		for lib in ncursesw ncurses curses ; do

Do you also plan to use pkg-config in the ccflags function?

Thanks,
Michal

#3 lore raw

Re: [PATCH 1/2] menuconfig: optionally use pkg-config to detect ncurses libs

Michal, All,

Quoted 2 lines · On Thursday 21 March 2013 Michal Marek wrote:

Dne 7.3.2013 19:20, Yann E. MORIN napsal(a):

Quoted 1 line

From: Justin Lecher <[email protected]>

[--SNIP--]

Quoted 6 lines
Quoted 6 lines
scripts/kconfig/lxdialog/check-lxdialog.sh +0 -0
index 8078813..782d200 100644
@@ -4,6 +4,8 @@
 # What library to link
Quoted 8 lines

scripts/kconfig/lxdialog/check-lxdialog.sh line 10

Quoted 6 lines
scripts/kconfig/lxdialog/check-lxdialog.sh +2 -0
 ldflags()
 {
+	pkg-config --libs ncursesw 2>/dev/null && exit
+	pkg-config --libs ncurses 2>/dev/null && exit
 	for ext in so a dll.a dylib ; do
 		for lib in ncursesw ncurses curses ; do

Do you also plan to use pkg-config in the ccflags function?

That was my intention to pursue Justin's work to the CFLAGS, but that is not so simple for menuconfig as it is for the libs, as:

- we need the name of the header to include: '-DCURSES_LOC="<path/ncurses.h>"' (where 'path' is a relative path) which we use as: #include CURSES_LOC
- there is no way to get this info from pkg-config

So, I'll be working a bit more on this this WE, and see if I can come with something meaningful and not too ugly. ;-)

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

PATCH 2/2 kconfig: optionally use pkg-config to detect ncurses libs

In reply to Yann E. MORIN

From: Justin Lecher <[email protected]>

When building ncurses with --with-termlib several symbols get moved from libncurses.so to libtinfo.so. Thus when linking with libncurses.so, one additionally needs to link with libtinfo.so.

The ncurses pkg-config module will be used to detect the necessary libs for linking. If not available the old way of directly specifying libs will be used.

---
 scripts/kconfig/Makefile |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
scripts/kconfig/Makefile +3 -1
index 231b475..844bc9d 100644
@@ -219,7 +219,9 @@ HOSTCFLAGS_gconf.o	= `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
 
 HOSTLOADLIBES_mconf   = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
 
-HOSTLOADLIBES_nconf	= -lmenu -lpanel -lncurses
+HOSTLOADLIBES_nconf	= $(shell \
+				pkg-config --libs menu panel ncurses 2>/dev/null \
+				|| echo "-lmenu -lpanel -lncurses"  )
 $(obj)/qconf.o: $(obj)/.tmp_qtcheck
 
 ifeq ($(qconf-target),1)
Signature · 1 line
1.7.2.5
#5 lore raw
In reply to Yann E. MORIN

Michal, All,

Quoted 3 lines · On Thursday 07 March 2013 Yann E. MORIN wrote:

Michal, please, pull to -rc-fixes, these two changes by Justin to fix ncurses-based kconfig frontends (mconf & nconf) compilation on systems where ncurses was built with a separate terminfo library.

Ping? ;-)

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw

Dne 18.3.2013 19:35, Yann E. MORIN napsal(a):

Quoted 8 lines

Michal, All,

Quoted 3 lines · On Thursday 07 March 2013 Yann E. MORIN wrote:

Michal, please, pull to -rc-fixes, these two changes by Justin to fix ncurses-based kconfig frontends (mconf & nconf) compilation on systems where ncurses was built with a separate terminfo library.

Ping? ;-)

Merged, sorry.

Michal