[RFA/RFC] (hppa/tui) Fix build failure due to missing wborder

Joel Brobecker
2004-02-23T22:03:55Z

[-- 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