1102644Snectardnl 2178825Sdfrdnl $Id: telnet.m4 15435 2005-06-16 19:45:52Z lha $ 3102644Snectardnl 4102644Snectardnl stuff used by telnet 5102644Snectar 6102644SnectarAC_DEFUN([rk_TELNET],[ 7102644SnectarAC_DEFINE(AUTHENTICATION, 1, 8102644Snectar [Define if you want authentication support in telnet.])dnl 9102644SnectarAC_DEFINE(ENCRYPTION, 1, 10102644Snectar [Define if you want encryption support in telnet.])dnl 11102644SnectarAC_DEFINE(DES_ENCRYPTION, 1, 12102644Snectar [Define if you want to use DES encryption in telnet.])dnl 13102644SnectarAC_DEFINE(DIAGNOSTICS, 1, 14102644Snectar [Define this to enable diagnostics in telnet.])dnl 15102644SnectarAC_DEFINE(OLD_ENVIRON, 1, 16102644Snectar [Define this to enable old environment option in telnet.])dnl 17102644Snectarif false; then 18102644Snectar AC_DEFINE(ENV_HACK, 1, 19102644Snectar [Define this if you want support for broken ENV_{VAR,VAL} telnets.]) 20102644Snectarfi 21102644Snectar 22102644Snectar# Simple test for streamspty, based on the existance of getmsg(), alas 23102644Snectar# this breaks on SunOS4 which have streams but BSD-like ptys 24102644Snectar# 25102644Snectar# And also something wierd has happend with dec-osf1, fallback to bsd-ptys 26102644Snectar 27102644Snectarcase "$host" in 28102644Snectar*-*-aix3*|*-*-sunos4*|*-*-osf*|*-*-hpux1[[01]]*) 29102644Snectar ;; 30102644Snectar*) 31102644Snectar AC_CHECK_FUNC(getmsg) 32102644Snectar if test "$ac_cv_func_getmsg" = "yes"; then 33102644Snectar AC_CACHE_CHECK([if getmsg works], ac_cv_func_getmsg_works, 34178825Sdfr AC_RUN_IFELSE([AC_LANG_SOURCE([[ 35102644Snectar #include <stdio.h> 36102644Snectar #include <errno.h> 37102644Snectar 38178825Sdfr int main(int argc, char **argv) 39102644Snectar { 40102644Snectar int ret; 41102644Snectar ret = getmsg(open("/dev/null", 0), NULL, NULL, NULL); 42102644Snectar if(ret < 0 && errno == ENOSYS) 43102644Snectar return 1; 44102644Snectar return 0; 45102644Snectar } 46178825Sdfr ]])], [ac_cv_func_getmsg_works=yes], 47178825Sdfr [ac_cv_func_getmsg_works=no], 48178825Sdfr [ac_cv_func_getmsg_works=no])) 49102644Snectar if test "$ac_cv_func_getmsg_works" = "yes"; then 50102644Snectar AC_DEFINE(HAVE_GETMSG, 1, 51102644Snectar [Define if you have a working getmsg.]) 52102644Snectar AC_DEFINE(STREAMSPTY, 1, 53102644Snectar [Define if you have streams ptys.]) 54102644Snectar fi 55102644Snectar fi 56102644Snectar ;; 57102644Snectaresac 58102644Snectar 59102644SnectarAH_BOTTOM([ 60102644Snectar#if defined(ENCRYPTION) && !defined(AUTHENTICATION) 61102644Snectar#define AUTHENTICATION 1 62102644Snectar#endif 63102644Snectar 64102644Snectar/* Set this to the default system lead string for telnetd 65102644Snectar * can contain %-escapes: %s=sysname, %m=machine, %r=os-release 66102644Snectar * %v=os-version, %t=tty, %h=hostname, %d=date and time 67102644Snectar */ 68102644Snectar#undef USE_IM 69102644Snectar 70102644Snectar/* Used with login -p */ 71102644Snectar#undef LOGIN_ARGS 72102644Snectar 73102644Snectar/* set this to a sensible login */ 74102644Snectar#ifndef LOGIN_PATH 75102644Snectar#define LOGIN_PATH BINDIR "/login" 76102644Snectar#endif 77102644Snectar]) 78102644Snectar]) 79