* [PATCH 1/2] menuconfig: optionally use pkg-config to detect ncurses libs
2013-03-06 13:02 ` Final versions of ncurses libs detection patches jlec
@ 2013-03-06 13:02 ` jlec
0 siblings, 0 replies; 8+ messages in thread
From: jlec @ 2013-03-06 13:02 UTC (permalink / raw)
To: linux-kbuild, linux-kernel; +Cc: Justin Lecher
From: Justin Lecher <jlec@gentoo.org>
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.
Signed-off-by: Justin Lecher <jlec@gentoo.org>
---
scripts/kconfig/lxdialog/check-lxdialog.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
index 8078813..782d200 100644
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -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 /
--
1.8.1.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [pull request] Pull request for branch yem-kconfig-rc-fixes
@ 2013-03-07 18:20 Yann E. MORIN
2013-03-07 18:20 ` [PATCH 1/2] menuconfig: optionally use pkg-config to detect ncurses libs Yann E. MORIN
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Yann E. MORIN @ 2013-03-07 18:20 UTC (permalink / raw)
To: Michal Marek, linux-kbuild; +Cc: Justin Lecher, Yann E. MORIN
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
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] menuconfig: optionally use pkg-config to detect ncurses libs
2013-03-07 18:20 [pull request] Pull request for branch yem-kconfig-rc-fixes Yann E. MORIN
@ 2013-03-07 18:20 ` Yann E. MORIN
2013-03-21 22:09 ` Michal Marek
2013-03-07 18:20 ` [PATCH 2/2] kconfig: " Yann E. MORIN
2013-03-18 18:35 ` [pull request] Pull request for branch yem-kconfig-rc-fixes Yann E. MORIN
2 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2013-03-07 18:20 UTC (permalink / raw)
To: Michal Marek, linux-kbuild; +Cc: Justin Lecher, Yann E. MORIN
From: Justin Lecher <jlec@gentoo.org>
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.
Signed-off-by: Justin Lecher <jlec@gentoo.org>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
scripts/kconfig/lxdialog/check-lxdialog.sh | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
index 8078813..782d200 100644
--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -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 /
--
1.7.2.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] kconfig: optionally use pkg-config to detect ncurses libs
2013-03-07 18:20 [pull request] Pull request for branch yem-kconfig-rc-fixes Yann E. MORIN
2013-03-07 18:20 ` [PATCH 1/2] menuconfig: optionally use pkg-config to detect ncurses libs Yann E. MORIN
@ 2013-03-07 18:20 ` Yann E. MORIN
2013-03-18 18:35 ` [pull request] Pull request for branch yem-kconfig-rc-fixes Yann E. MORIN
2 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2013-03-07 18:20 UTC (permalink / raw)
To: Michal Marek, linux-kbuild; +Cc: Justin Lecher, Yann E. MORIN
From: Justin Lecher <jlec@gentoo.org>
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.
Signed-off-by: Justin Lecher <jlec@gentoo.org>
[yann.morin.1998@free.fr: fix typo: '-ncurses' --> '-lncurses']
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
scripts/kconfig/Makefile | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 231b475..844bc9d 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -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)
--
1.7.2.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [pull request] Pull request for branch yem-kconfig-rc-fixes
2013-03-07 18:20 [pull request] Pull request for branch yem-kconfig-rc-fixes Yann E. MORIN
2013-03-07 18:20 ` [PATCH 1/2] menuconfig: optionally use pkg-config to detect ncurses libs Yann E. MORIN
2013-03-07 18:20 ` [PATCH 2/2] kconfig: " Yann E. MORIN
@ 2013-03-18 18:35 ` Yann E. MORIN
2013-03-21 22:09 ` Michal Marek
2 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2013-03-18 18:35 UTC (permalink / raw)
To: linux-kbuild; +Cc: Michal Marek, Justin Lecher
Michal, All,
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.
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] menuconfig: optionally use pkg-config to detect ncurses libs
2013-03-07 18:20 ` [PATCH 1/2] menuconfig: optionally use pkg-config to detect ncurses libs Yann E. MORIN
@ 2013-03-21 22:09 ` Michal Marek
2013-03-22 18:30 ` Yann E. MORIN
0 siblings, 1 reply; 8+ messages in thread
From: Michal Marek @ 2013-03-21 22:09 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: linux-kbuild, Justin Lecher
Dne 7.3.2013 19:20, Yann E. MORIN napsal(a):
> From: Justin Lecher <jlec@gentoo.org>
>
> 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.
>
> Signed-off-by: Justin Lecher <jlec@gentoo.org>
> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> ---
> scripts/kconfig/lxdialog/check-lxdialog.sh | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
> index 8078813..782d200 100644
> --- a/scripts/kconfig/lxdialog/check-lxdialog.sh
> +++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
> @@ -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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [pull request] Pull request for branch yem-kconfig-rc-fixes
2013-03-18 18:35 ` [pull request] Pull request for branch yem-kconfig-rc-fixes Yann E. MORIN
@ 2013-03-21 22:09 ` Michal Marek
0 siblings, 0 replies; 8+ messages in thread
From: Michal Marek @ 2013-03-21 22:09 UTC (permalink / raw)
To: Yann E. MORIN; +Cc: linux-kbuild, Justin Lecher
Dne 18.3.2013 19:35, Yann E. MORIN napsal(a):
> Michal, All,
>
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] menuconfig: optionally use pkg-config to detect ncurses libs
2013-03-21 22:09 ` Michal Marek
@ 2013-03-22 18:30 ` Yann E. MORIN
0 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2013-03-22 18:30 UTC (permalink / raw)
To: linux-kbuild; +Cc: Michal Marek, Justin Lecher
Michal, All,
On Thursday 21 March 2013 Michal Marek wrote:
> Dne 7.3.2013 19:20, Yann E. MORIN napsal(a):
> > From: Justin Lecher <jlec@gentoo.org>
[--SNIP--]
> > diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
> > index 8078813..782d200 100644
> > --- a/scripts/kconfig/lxdialog/check-lxdialog.sh
> > +++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
> > @@ -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?
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.
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-03-22 18:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-07 18:20 [pull request] Pull request for branch yem-kconfig-rc-fixes Yann E. MORIN
2013-03-07 18:20 ` [PATCH 1/2] menuconfig: optionally use pkg-config to detect ncurses libs Yann E. MORIN
2013-03-21 22:09 ` Michal Marek
2013-03-22 18:30 ` Yann E. MORIN
2013-03-07 18:20 ` [PATCH 2/2] kconfig: " Yann E. MORIN
2013-03-18 18:35 ` [pull request] Pull request for branch yem-kconfig-rc-fixes Yann E. MORIN
2013-03-21 22:09 ` Michal Marek
[not found] <Use config scripts to detect ncurses libs for, menuconfig/nconfig dialogs>
2013-03-06 13:02 ` Final versions of ncurses libs detection patches jlec
2013-03-06 13:02 ` [PATCH 1/2] menuconfig: optionally use pkg-config to detect ncurses libs jlec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox