* [RFA/RFC] (hppa/tui) Fix build failure due to missing wborder
@ 2004-02-23 22:03 Joel Brobecker
2004-02-24 23:34 ` Andrew Cagney
0 siblings, 1 reply; 9+ messages in thread
From: Joel Brobecker @ 2004-02-23 22:03 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 594 bytes --]
Hello,
Re: http://sources.redhat.com/ml/gdb-patches/2004-02/msg00654.html
On HP/UX, the GDB build fails during the link due to a missing wborder.
I found the symbol in libcur_colr.sl. To fix the build, I suggest the
following change, although I could conceive that this is not the best
way of handling this. Comments and suggestions warmly welcome.
2004-02-23 J. Brobecker <brobecker@gnat.com>
* configure.in (LIBS): Add -lcur_colr when TUI is enabled and
when using the HP curses library.
* configure: Regenerate.
Tested on HP/UX 11.00, and x86-linux.
--
Joel
[-- Attachment #2: configure.in.diff --]
[-- Type: text/plain, Size: 1831 bytes --]
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.147
diff -u -2 -0 -r1.147 configure.in
--- configure.in 18 Feb 2004 19:01:36 -0000 1.147
+++ configure.in 23 Feb 2004 21:49:25 -0000
@@ -150,40 +150,45 @@
AC_ARG_ENABLE(tui,
[ --enable-tui enable full-screen terminal user interface (TUI)],
[case $enableval in
yes | no)
;;
*)
AC_MSG_ERROR([bad value $enableval for --enable-tui]) ;;
esac],enable_tui=yes)
if test x"$enable_tui" = xyes; then
if test -d $srcdir/tui; then
if test "$ac_cv_search_initscr" != no; then
CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
CONFIG_ALL="${CONFIG_ALL} all-tui"
CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
+ if test "$ac_cv_search_initscr" = "-lHcurses"; then
+ # Hcurses does not provide all of curses. Certain functions
+ # such as wborder for instance are provided by libcur_colr.
+ LIBS="$LIBS -lcur_colr"
+ fi
fi
fi
fi
# Enable gdbtk.
AC_ARG_ENABLE(gdbtk,
[ --enable-gdbtk enable gdbtk graphical user interface (GUI)],
[case $enableval in
yes | no)
;;
*)
AC_MSG_ERROR([bad value $enableval for --enable-gdbtk]) ;;
esac],
[if test -d $srcdir/gdbtk; then
enable_gdbtk=yes
else
enable_gdbtk=no
fi])
# We unconditionally disable gdbtk tests on selected platforms.
case $host_os in
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA/RFC] (hppa/tui) Fix build failure due to missing wborder
2004-02-23 22:03 [RFA/RFC] (hppa/tui) Fix build failure due to missing wborder Joel Brobecker
@ 2004-02-24 23:34 ` Andrew Cagney
2004-02-25 1:18 ` Joel Brobecker
0 siblings, 1 reply; 9+ messages in thread
From: Andrew Cagney @ 2004-02-24 23:34 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
> Hello,
>
> Re: http://sources.redhat.com/ml/gdb-patches/2004-02/msg00654.html
>
> On HP/UX, the GDB build fails during the link due to a missing wborder.
> I found the symbol in libcur_colr.sl. To fix the build, I suggest the
> following change, although I could conceive that this is not the best
> way of handling this. Comments and suggestions warmly welcome.
[ditto ...]
> 2004-02-23 J. Brobecker <brobecker@gnat.com>
>
> * configure.in (LIBS): Add -lcur_colr when TUI is enabled and
> when using the HP curses library.
> * configure: Regenerate.
>
> Tested on HP/UX 11.00, and x86-linux.
I wonder, should configure be checking that wborder can be found with
something like:
AC_SEARCH_LIBS(wborder, [ncurses Hcurses cur_colr curses pdcurses], [],
[AC_MSG_WARN([no library containing wborder found])])
and then just test that both ac_cv_search_initscr and
ac_cv_search_wborder are not "no"?
Andrew
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA/RFC] (hppa/tui) Fix build failure due to missing wborder
2004-02-24 23:34 ` Andrew Cagney
@ 2004-02-25 1:18 ` Joel Brobecker
2004-02-25 2:09 ` Daniel Jacobowitz
0 siblings, 1 reply; 9+ messages in thread
From: Joel Brobecker @ 2004-02-25 1:18 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
> I wonder, should configure be checking that wborder can be found with
> something like:
>
> AC_SEARCH_LIBS(wborder, [ncurses Hcurses cur_colr curses pdcurses], [],
> [AC_MSG_WARN([no library containing wborder found])])
>
> and then just test that both ac_cv_search_initscr and
> ac_cv_search_wborder are not "no"?
That's something I thought about, but then what happens if we found
both initscr and wborder in the same library, for instance "ncurses".
We would probably end up linking with the same -l<...> switch twice.
Not very elegant. Would you prefer this approach, though? I figured
that, since Hcurses is already HPUX-specific AFAIK, we might as well
take advantage of that knowledge and add -lcur_colr as I did. On the
other hand, mutter something about HP eventually finding their way to
the bright side of the force and putting wborder back inside Hcurses...
I prefer your suggestion too, shall I go ahead? Any objection?
--
Joel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA/RFC] (hppa/tui) Fix build failure due to missing wborder
2004-02-25 1:18 ` Joel Brobecker
@ 2004-02-25 2:09 ` Daniel Jacobowitz
2004-02-25 18:59 ` Joel Brobecker
0 siblings, 1 reply; 9+ messages in thread
From: Daniel Jacobowitz @ 2004-02-25 2:09 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Andrew Cagney, gdb-patches
On Tue, Feb 24, 2004 at 05:18:11PM -0800, Joel Brobecker wrote:
> > I wonder, should configure be checking that wborder can be found with
> > something like:
> >
> > AC_SEARCH_LIBS(wborder, [ncurses Hcurses cur_colr curses pdcurses], [],
> > [AC_MSG_WARN([no library containing wborder found])])
> >
> > and then just test that both ac_cv_search_initscr and
> > ac_cv_search_wborder are not "no"?
>
> That's something I thought about, but then what happens if we found
> both initscr and wborder in the same library, for instance "ncurses".
> We would probably end up linking with the same -l<...> switch twice.
> Not very elegant. Would you prefer this approach, though? I figured
> that, since Hcurses is already HPUX-specific AFAIK, we might as well
> take advantage of that knowledge and add -lcur_colr as I did. On the
> other hand, mutter something about HP eventually finding their way to
> the bright side of the force and putting wborder back inside Hcurses...
>
> I prefer your suggestion too, shall I go ahead? Any objection?
Try this instead:
AC_CHECK_FUNC(wborder, [],
[AC_SEARCH_LIBS(wborder, [cur_colr], [],
[AC_MSG_WARN([...])])])
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA/RFC] (hppa/tui) Fix build failure due to missing wborder
2004-02-25 2:09 ` Daniel Jacobowitz
@ 2004-02-25 18:59 ` Joel Brobecker
2004-02-25 19:55 ` Andrew Cagney
2004-02-25 20:30 ` Mark Kettenis
0 siblings, 2 replies; 9+ messages in thread
From: Joel Brobecker @ 2004-02-25 18:59 UTC (permalink / raw)
To: Andrew Cagney, gdb-patches
[-- Attachment #1: Type: text/plain, Size: 903 bytes --]
On Tue, Feb 24, 2004 at 09:09:42PM -0500, Daniel Jacobowitz wrote:
> Try this instead:
> AC_CHECK_FUNC(wborder, [],
> [AC_SEARCH_LIBS(wborder, [cur_colr], [],
> [AC_MSG_WARN([...])])])
Very clever! I didn't know that AC_CHECK_FUNC was using $LIBS to
link its test program...
Attach is a new suggested patch.
2004-02-25 J. Brobecker <brobecker@gnat.com>
* configure.in: Make sure that the wborder function is available.
Otherwise, search for it in the cur_colr library.
* configure: Regenerate.
On HP/UX, configure outputs:
checking for library containing initscr... -lHcurses
checking for wborder... no
checking for library containing wborder... -lcur_colr
On Linux, configure says:
checking for library containing initscr... -lncurses
checking for wborder... yes
In both cases, I verified that TUI was linked in.
--
Joel
[-- Attachment #2: configure.in.diff --]
[-- Type: text/plain, Size: 1470 bytes --]
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.147
diff -u -p -r1.147 configure.in
--- configure.in 18 Feb 2004 19:01:36 -0000 1.147
+++ configure.in 25 Feb 2004 18:57:33 -0000
@@ -146,6 +146,16 @@ fi
AC_SEARCH_LIBS(initscr, [ncurses Hcurses curses pdcurses], [],
[AC_MSG_WARN([no curses library found])])
+# Check whether the wborder function is provided by the curses
+# library detected above. In certain implementations such as
+# the HP/UX Hcurses for instance, this function is provided by an
+# additional library. So if we did not find this function inside
+# the curses library, try some alternate libraries we know might
+# provide it.
+AC_CHECK_FUNC(wborder, [wborder_available=yes],
+ [AC_SEARCH_LIBS(wborder, [cur_colr], [wborder_available=yes],
+ [AC_MSG_WARN([no wborder function found])])])
+
# Enable TUI.
AC_ARG_ENABLE(tui,
[ --enable-tui enable full-screen terminal user interface (TUI)],
@@ -157,7 +167,7 @@ AC_ARG_ENABLE(tui,
esac],enable_tui=yes)
if test x"$enable_tui" = xyes; then
if test -d $srcdir/tui; then
- if test "$ac_cv_search_initscr" != no; then
+ if test "$ac_cv_search_initscr" != no -a "$wborder_available" = "yes"; then
CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA/RFC] (hppa/tui) Fix build failure due to missing wborder
2004-02-25 18:59 ` Joel Brobecker
@ 2004-02-25 19:55 ` Andrew Cagney
2004-02-25 20:11 ` Joel Brobecker
2004-02-25 20:30 ` Mark Kettenis
1 sibling, 1 reply; 9+ messages in thread
From: Andrew Cagney @ 2004-02-25 19:55 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
> On Tue, Feb 24, 2004 at 09:09:42PM -0500, Daniel Jacobowitz wrote:
>
>>> Try this instead:
>>> AC_CHECK_FUNC(wborder, [],
>>> [AC_SEARCH_LIBS(wborder, [cur_colr], [],
>>> [AC_MSG_WARN([...])])])
>
>
> Very clever! I didn't know that AC_CHECK_FUNC was using $LIBS to
> link its test program...
>
> Attach is a new suggested patch.
Yes, ok.
Andrew
$ date -u
Wed Feb 25 19:55:12 UTC 2004
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA/RFC] (hppa/tui) Fix build failure due to missing wborder
2004-02-25 19:55 ` Andrew Cagney
@ 2004-02-25 20:11 ` Joel Brobecker
0 siblings, 0 replies; 9+ messages in thread
From: Joel Brobecker @ 2004-02-25 20:11 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb-patches
On Wed, Feb 25, 2004 at 02:55:25PM -0500, Andrew Cagney wrote:
> >On Tue, Feb 24, 2004 at 09:09:42PM -0500, Daniel Jacobowitz wrote:
> >
> >>>Try this instead:
> >>> AC_CHECK_FUNC(wborder, [],
> >>> [AC_SEARCH_LIBS(wborder, [cur_colr], [],
> >>> [AC_MSG_WARN([...])])])
> >
> >
> >Very clever! I didn't know that AC_CHECK_FUNC was using $LIBS to
> >link its test program...
> >
> >Attach is a new suggested patch.
>
> Yes, ok.
Thank you, checked in.
--
Joel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA/RFC] (hppa/tui) Fix build failure due to missing wborder
2004-02-25 18:59 ` Joel Brobecker
2004-02-25 19:55 ` Andrew Cagney
@ 2004-02-25 20:30 ` Mark Kettenis
2004-02-26 0:43 ` Joel Brobecker
1 sibling, 1 reply; 9+ messages in thread
From: Mark Kettenis @ 2004-02-25 20:30 UTC (permalink / raw)
To: brobecker; +Cc: cagney, gdb-patches
Date: Wed, 25 Feb 2004 10:59:46 -0800
From: Joel Brobecker <brobecker@gnat.com>
--7iMSBzlTiPOCCT2k
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Tue, Feb 24, 2004 at 09:09:42PM -0500, Daniel Jacobowitz wrote:
> Try this instead:
> AC_CHECK_FUNC(wborder, [],
> [AC_SEARCH_LIBS(wborder, [cur_colr], [],
> [AC_MSG_WARN([...])])])
Very clever! I didn't know that AC_CHECK_FUNC was using $LIBS to
link its test program...
Except that AC_SEARCH_LIBS is clever enough itself. It first tries to
find the function in the libraries already present.
AC_SEARCH_LIBS (initscr, [ncurses ...]), [], [AC_MSG_WARN...])
AC_SEARCH_LIBS (wborder, cur_clr, [], [AC_MSG_WARN...])
Should do exactly what you want.
Mark
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA/RFC] (hppa/tui) Fix build failure due to missing wborder
2004-02-25 20:30 ` Mark Kettenis
@ 2004-02-26 0:43 ` Joel Brobecker
0 siblings, 0 replies; 9+ messages in thread
From: Joel Brobecker @ 2004-02-26 0:43 UTC (permalink / raw)
To: Mark Kettenis; +Cc: cagney, gdb-patches
[-- Attachment #1: Type: text/plain, Size: 522 bytes --]
> Except that AC_SEARCH_LIBS is clever enough itself. It first tries to
> find the function in the libraries already present.
>
> AC_SEARCH_LIBS (initscr, [ncurses ...]), [], [AC_MSG_WARN...])
> AC_SEARCH_LIBS (wborder, cur_clr, [], [AC_MSG_WARN...])
>
> Should do exactly what you want.
Thanks for the tip! I checked the following change in.
2004-02-25 J. Brobecker <brobecker@gnat.com>
* configure.in: Refine the previous change.
* configure: Regenerate.
Tested on hpux and x86-linux.
--
Joel
[-- Attachment #2: configure.in.diff --]
[-- Type: text/plain, Size: 1267 bytes --]
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.148
diff -u -p -r1.148 configure.in
--- configure.in 25 Feb 2004 20:09:46 -0000 1.148
+++ configure.in 26 Feb 2004 00:41:27 -0000
@@ -152,9 +152,8 @@ AC_SEARCH_LIBS(initscr, [ncurses Hcurses
# additional library. So if we did not find this function inside
# the curses library, try some alternate libraries we know might
# provide it.
-AC_CHECK_FUNC(wborder, [wborder_available=yes],
- [AC_SEARCH_LIBS(wborder, [cur_colr], [wborder_available=yes],
- [AC_MSG_WARN([no wborder function found])])])
+AC_SEARCH_LIBS(wborder, [cur_colr], [],
+ [AC_MSG_WARN([wborder function not found, tui will be disabled])])
# Enable TUI.
AC_ARG_ENABLE(tui,
@@ -167,7 +166,7 @@ AC_ARG_ENABLE(tui,
esac],enable_tui=yes)
if test x"$enable_tui" = xyes; then
if test -d $srcdir/tui; then
- if test "$ac_cv_search_initscr" != no -a "$wborder_available" = "yes"; then
+ if test "$ac_cv_search_initscr" != no -a "$ac_cv_search_wborder" != no; then
CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2004-02-26 0:43 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-23 22:03 [RFA/RFC] (hppa/tui) Fix build failure due to missing wborder Joel Brobecker
2004-02-24 23:34 ` Andrew Cagney
2004-02-25 1:18 ` Joel Brobecker
2004-02-25 2:09 ` Daniel Jacobowitz
2004-02-25 18:59 ` Joel Brobecker
2004-02-25 19:55 ` Andrew Cagney
2004-02-25 20:11 ` Joel Brobecker
2004-02-25 20:30 ` Mark Kettenis
2004-02-26 0:43 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox