From b1a66e29446be5618f78611cac0540bd00654154 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 6 Mar 2010 21:37:34 +0100 Subject: [PATCH] Switch from termlib to ncurses --- bacula/autoconf/configure.in | 8 ++++---- bacula/src/console/conio.c | 14 ++++---------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in index fbe2d5fe3a..4eed940941 100644 --- a/bacula/autoconf/configure.in +++ b/bacula/autoconf/configure.in @@ -818,10 +818,10 @@ if test x$support_ipv6 = xyes; then fi TERM_LIB="" -AC_CHECK_HEADER(termcap.h, - [ AC_CHECK_LIB(termcap, tgetent, - [ TERM_LIB="-ltermcap" ], - [ AC_CHECK_LIB(ncurses, tgetent, [ TERM_LIB="-lncurses" ]) +AC_CHECK_HEADER(curses.h, + [ AC_CHECK_LIB(ncurses, tgetent, + [ TERM_LIB="-lncurses" ], + [ AC_CHECK_LIB(termcap, tgetent, [ TERM_LIB="-ltermcap" ]) ]) ], [ AC_CHECK_HEADERS(curses.h) diff --git a/bacula/src/console/conio.c b/bacula/src/console/conio.c index f35dda8976..b5908ca882 100755 --- a/bacula/src/console/conio.c +++ b/bacula/src/console/conio.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 1981-2009 Free Software Foundation Europe e.V. + Copyright (C) 1981-2010 Free Software Foundation Europe e.V. Yes, that is 1981 no error. The main author of Bacula is Kern Sibbald, with contributions from @@ -61,17 +61,14 @@ #endif -#include +#include +#include + #ifdef HAVE_SUN_OS extern "C" int tgetent(void *, const char *); extern "C" int tgetnum(const char *); extern "C" char *tgetstr (const char*, char**); extern "C" char *tgoto (const char *, int, int); -#elif HAVE_HPUX_OS -#include -#elif HAVE_AIX_OS -#include -#include #elif defined(__sgi) extern "C" int tgetent(char *, char *); extern "C" int tgetnum(char id[2]); @@ -82,9 +79,6 @@ extern "C" int tgetent(void *, const char *); extern "C" int tgetnum(const char *); extern "C" char *tgetstr (const char*, char**); extern "C" char *tgoto (const char *, int, int); - -#else -#include #endif #include "func.h" -- 2.39.5