From: Nathan Bryant Date: Fri, 31 May 2002 18:34:04 +0000 (+0000) Subject: better curses compatibility, and a couple makefile/configure tweaks X-Git-Tag: v7.86~6386 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=455a2571776ea2086f98281a0cd6d3015fcc9bec;p=citadel.git better curses compatibility, and a couple makefile/configure tweaks --- diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 2d9b8c670..fe877cd45 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,7 @@ $Log$ + Revision 591.33 2002/05/31 18:34:04 nbryant + better curses compatibility, and a couple makefile/configure tweaks + Revision 591.32 2002/05/28 13:59:02 ajc * Removed the 'netsetup' and 'dnetsetup' utilities (obsolete) @@ -3682,4 +3685,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import - diff --git a/citadel/Makefile.in b/citadel/Makefile.in index 9d2682581..d87b09a2a 100644 --- a/citadel/Makefile.in +++ b/citadel/Makefile.in @@ -275,7 +275,7 @@ install-exec: all weekly (cd modules && ../$(LIBTOOL) --mode=install $(INSTALL) `basename $$i` $(root)$(prefix)/$$i) ; \ fi \ done - @for i in utilsmenu weekly do \ + @for i in utilsmenu weekly ; do \ if test -f $(srcdir)/$$i; then \ echo $(INSTALL) $(srcdir)/$$i $(root)$(prefix)/$$i; \ $(INSTALL) $(srcdir)/$$i $(root)$(prefix)/$$i; \ diff --git a/citadel/configure.ac b/citadel/configure.ac index d965ba3ce..23d71fc55 100644 --- a/citadel/configure.ac +++ b/citadel/configure.ac @@ -29,6 +29,7 @@ AC_ARG_WITH(ssl, fi ] ) +AC_ARG_WITH(ncurses, [ --without-ncurses don't use ncurses]) if test "x$with_gdbm" != xno -a "x$with_gdbm" != xyes -a "$with_gdbm"; then db_dir="$with_gdbm" @@ -197,9 +198,14 @@ fi test -f /usr/local/lib/libresolv.a && LDFLAGS="$LDFLAGS -L/usr/local/lib" AC_CHECK_LIB(resolv, res_query, RESOLV="$RESOLV -lresolv") -AC_SEARCH_LIBS(tgetent, [ncurses curses termcap]) -AC_SEARCH_LIBS(initscr, [ncurses curses]) -AC_CHECK_FUNCS(vw_printw wcolor_set) +if test "x$with_ncurses" != xno; then + AC_SEARCH_LIBS(tgetent, [ncurses curses termcap]) + AC_SEARCH_LIBS(initscr, [ncurses curses]) +else + AC_SEARCH_LIBS(tgetent, [curses termcap]) + AC_SEARCH_LIBS(initscr, [curses]) +fi +AC_CHECK_FUNCS(vw_printw wcolor_set resizeterm wresize) dnl Check for libpthread(s) if we're not using Digital UNIX or FreeBSD. (On dnl which the -pthread flag takes care of this.) @@ -367,7 +373,15 @@ dnl dnl TODO: for the DB header checks, we should check whether the headers dnl define db_env_create, somehow dnl -AC_CHECK_HEADERS(curses.h ncurses.h dl.h fcntl.h limits.h termios.h sys/ioctl.h sys/select.h sys/time.h syslog.h unistd.h utmp.h utmpx.h paths.h db.h db3/db.h db4/db.h pthread.h netinet/in.h) +AC_CHECK_HEADERS(curses.h dl.h fcntl.h limits.h termios.h sys/ioctl.h sys/select.h sys/time.h syslog.h unistd.h utmp.h utmpx.h paths.h db.h db3/db.h db4/db.h pthread.h netinet/in.h) + +dnl +dnl need to check if this is actually compilable, sometimes there are +dnl conflicts with the system's headers (eg solaris xpg4 style headers) +dnl +if test "x$with_ncurses" != xno; then + AC_CHECK_HEADERS(ncurses.h,,,[ ]) +fi AC_CHECK_HEADER(resolv.h, [SMTP=modules/libsmtp.la; DOMAIN=domain.c],, [#ifdef HAVE_SYS_TYPES_H diff --git a/citadel/screen.c b/citadel/screen.c index cc145cc23..7d7ba9afd 100644 --- a/citadel/screen.c +++ b/citadel/screen.c @@ -5,6 +5,7 @@ */ #include "sysdep.h" +#include "screen.h" #include #include #include @@ -22,7 +23,6 @@ #endif #include "citadel.h" #include "commands.h" -#include "screen.h" #include "citadel_decls.h" #ifdef HAVE_CURSES_H @@ -416,9 +416,13 @@ int scr_set_windowsize() #ifdef HAVE_CURSES_H if (mainwindow && caught_sigwinch) { caught_sigwinch = 0; +#ifdef HAVE_RESIZETERM resizeterm(screenheight + 1, screenwidth); +#endif +#ifdef HAVE_WRESIZE wresize(mainwindow, screenheight, screenwidth); wresize(statuswindow, 1, screenwidth); +#endif mvwin(statuswindow, screenheight, 0); status_line(serv_info.serv_humannode, serv_info.serv_bbs_city, room_name, secure, -1);