better curses compatibility, and a couple makefile/configure tweaks
authorNathan Bryant <loanshark@uncensored.citadel.org>
Fri, 31 May 2002 18:34:04 +0000 (18:34 +0000)
committerNathan Bryant <loanshark@uncensored.citadel.org>
Fri, 31 May 2002 18:34:04 +0000 (18:34 +0000)
citadel/ChangeLog
citadel/Makefile.in
citadel/configure.ac
citadel/screen.c

index 2d9b8c6705f3da5cb15be6aa1d6ccb0e70192709..fe877cd456da012cea89d6f3d89d62f091e9551f 100644 (file)
@@ -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 <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index 9d2682581fcfff0d76e12889bd20c114772901a1..d87b09a2af46acd8c9152b6e32c439eaef7b4478 100644 (file)
@@ -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; \
index d965ba3ce7fbd172ff6fc1dc2a3348876cfcae8a..23d71fc559ae6c61ed898b97eafd7425c6326b6f 100644 (file)
@@ -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
index cc145cc238e573f21fd02d5f33597189639a43da..7d7ba9afd60be7b003734017237c404512449e15 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include "sysdep.h"
+#include "screen.h"
 #include <stdio.h>
 #include <signal.h>
 #include <string.h>
@@ -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);