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

Joel Brobecker
2004-02-26T00:43:53Z

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