Index: config.h.in =================================================================== RCS file: /var/cvs/gopher/config.h.in,v retrieving revision 1.9 diff -a -u -d -u -r1.9 config.h.in --- config.h.in 19 Mar 2002 20:37:28 -0000 1.9 +++ config.h.in 21 Mar 2002 15:09:33 -0000 @@ -175,6 +175,18 @@ /* Define if you have the waitpid function. */ #undef HAVE_WAITPID +/* Define if you have the wattroff function. */ +#undef HAVE_WATTROFF + +/* Define if you have the wattron function. */ +#undef HAVE_WATTRON + +/* Define if you have the wstandend function. */ +#undef HAVE_WSTANDEND + +/* Define if you have the wstandout function. */ +#undef HAVE_WSTANDOUT + /* Define if you have the header file. */ #undef HAVE_CRYPT_H @@ -259,6 +271,9 @@ /* Define if you have the header file. */ #undef HAVE_UNISTD_H +/* Define if you have the curses library (-lcurses). */ +#undef HAVE_LIBCURSES + /* Define if you have the dgc library (-ldgc). */ #undef HAVE_LIBDGC @@ -279,3 +294,6 @@ /* Define if you have the socket library (-lsocket). */ #undef HAVE_LIBSOCKET + +/* Define if you have the termcap library (-ltermcap). */ +#undef HAVE_LIBTERMCAP Index: configure =================================================================== RCS file: /var/cvs/gopher/configure,v retrieving revision 1.14 diff -a -u -d -u -r1.14 configure --- configure 19 Mar 2002 20:42:48 -0000 1.14 +++ configure 21 Mar 2002 15:09:33 -0000 @@ -3960,15 +3960,103 @@ KMEM_GROUP=$ac_cv_group_kmem fi -for ac_func in bzero gethostname fgetpwent get_current_dir_name getcwd getwd madvise mkdir mktime putenv re_comp select seteuid setsid socket strcasecmp strcspn strdup strerror strftime strspn strstr strtol sysconf tempnam tzset wait3 waitpid strcasestr regcomp regfree + + +echo $ac_n "checking for main in -lcurses""... $ac_c" 1>&6 +echo "configure:3967: checking for main in -lcurses" >&5 +ac_lib_var=`echo curses'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lcurses $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo curses | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +echo $ac_n "checking for main in -ltermcap""... $ac_c" 1>&6 +echo "configure:4010: checking for main in -ltermcap" >&5 +ac_lib_var=`echo termcap'_'main | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ltermcap $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +for ac_func in bzero gethostname fgetpwent get_current_dir_name getcwd getwd madvise mkdir mktime putenv re_comp select seteuid setsid socket strcasecmp strcspn strdup strerror strftime strspn strstr strtol sysconf tempnam tzset wait3 waitpid strcasestr regcomp regfree wattron wattroff wstandout wstandend do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3967: checking for $ac_func" >&5 +echo "configure:4055: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4015,24 +4103,22 @@ fi done + cat > conftest.$ac_ext < int main() { getdtablesize(); ; return 0; } EOF -if { (eval echo configure:4027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* - - - trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure Index: configure.in =================================================================== RCS file: /var/cvs/gopher/configure.in,v retrieving revision 1.15 diff -a -u -d -u -r1.15 configure.in --- configure.in 19 Mar 2002 20:42:48 -0000 1.15 +++ configure.in 21 Mar 2002 15:09:33 -0000 @@ -207,10 +207,13 @@ AC_FUNC_VFORK AC_FUNC_VPRINTF AC_FUNC_GETLOADAVG -AC_CHECK_FUNCS(bzero gethostname fgetpwent get_current_dir_name getcwd getwd madvise mkdir mktime putenv re_comp select seteuid setsid socket strcasecmp strcspn strdup strerror strftime strspn strstr strtol sysconf tempnam tzset wait3 waitpid strcasestr regcomp regfree) -AC_TRY_LINK("unistd.h", [getdtablesize();]) +dnl Do this again so the AC_CHECK_FUNCS works. +AC_CHECK_LIB(curses, main) +AC_CHECK_LIB(termcap, main) +AC_CHECK_FUNCS(bzero gethostname fgetpwent get_current_dir_name getcwd getwd madvise mkdir mktime putenv re_comp select seteuid setsid socket strcasecmp strcspn strdup strerror strftime strspn strstr strtol sysconf tempnam tzset wait3 waitpid strcasestr regcomp regfree wattron wattroff wstandout wstandend) +AC_TRY_LINK([#include ], [getdtablesize();]) AC_OUTPUT(Makefile Makefile.config gopherd/Makefile object/Makefile gopher/Makefile gopher/locales/Makefile doc/Makefile gophfilt/Makefile) Index: gopher/CURcurses.h =================================================================== RCS file: /var/cvs/gopher/gopher/CURcurses.h,v retrieving revision 1.4 diff -a -u -d -u -r1.4 CURcurses.h --- gopher/CURcurses.h 17 Jan 2001 21:48:05 -0000 1.4 +++ gopher/CURcurses.h 21 Mar 2002 15:09:34 -0000 @@ -257,12 +257,12 @@ #define CURsetSIGTSTP(a,b) ((a)->sigtstp=(b)) #define CURsetSIGWINCH(a,b) ((a)->sigwinch=(b)) -#if defined(SYSVCURSES) || defined(A_BOLD) -#define wboldout(win) (wattron(win, A_BOLD)) -#define wboldend(win) (wattroff(win, A_BOLD)) -#else +#ifdef HAVE_WSTANDOUT #define wboldout(win) (wstandout(win)) #define wboldend(win) (wstandend(win)) +#else +#define wboldout(win) (wattron(win, A_BOLD)) +#define wboldend(win) (wattroff(win, A_BOLD)) #endif #define CURgetBox_ul(a) ((a)->Box_ul)