Home | History | Annotate | Line # | Download | only in cf
      1 dnl
      2 dnl Id
      3 dnl
      4 dnl stuff used by telnet
      5 
      6 AC_DEFUN([rk_TELNET],[
      7 AC_DEFINE(AUTHENTICATION, 1, 
      8 	[Define if you want authentication support in telnet.])dnl
      9 AC_DEFINE(ENCRYPTION, 1,
     10 	[Define if you want encryption support in telnet.])dnl
     11 AC_DEFINE(DES_ENCRYPTION, 1,
     12 	[Define if you want to use DES encryption in telnet.])dnl
     13 AC_DEFINE(DIAGNOSTICS, 1,
     14 	[Define this to enable diagnostics in telnet.])dnl
     15 AC_DEFINE(OLD_ENVIRON, 1,
     16 	[Define this to enable old environment option in telnet.])dnl
     17 if false; then
     18 	AC_DEFINE(ENV_HACK, 1,
     19 		[Define this if you want support for broken ENV_{VAR,VAL} telnets.])
     20 fi
     21 
     22 # Simple test for streamspty, based on the existance of getmsg(), alas
     23 # this breaks on SunOS4 which have streams but BSD-like ptys
     24 #
     25 # And also something wierd has happend with dec-osf1, fallback to bsd-ptys
     26 
     27 case "$host" in
     28 *-*-aix3*|*-*-sunos4*|*-*-osf*|*-*-hpux1[[01]]*)
     29 	;;
     30 *)
     31 	AC_CHECK_FUNC(getmsg)
     32 	if test "$ac_cv_func_getmsg" = "yes"; then
     33 		AC_CACHE_CHECK([if getmsg works], ac_cv_func_getmsg_works,
     34 		AC_RUN_IFELSE([AC_LANG_SOURCE([[
     35 			#include <stdio.h>
     36 			#include <errno.h>
     37 
     38 			int main(int argc, char **argv)
     39 			{
     40 			  int ret;
     41 			  ret = getmsg(open("/dev/null", 0), NULL, NULL, NULL);
     42 			  if(ret < 0 && errno == ENOSYS)
     43 			    return 1;
     44 			  return 0;
     45 			}
     46 			]])], [ac_cv_func_getmsg_works=yes], 
     47 			[ac_cv_func_getmsg_works=no],
     48 			[ac_cv_func_getmsg_works=no]))
     49 		if test "$ac_cv_func_getmsg_works" = "yes"; then
     50 			AC_DEFINE(HAVE_GETMSG, 1,
     51 				[Define if you have a working getmsg.])
     52 			AC_DEFINE(STREAMSPTY, 1,
     53 				[Define if you have streams ptys.])
     54 		fi
     55 	fi
     56 	;;
     57 esac
     58 
     59 AH_BOTTOM([
     60 
     61 /* Set this to the default system lead string for telnetd 
     62  * can contain %-escapes: %s=sysname, %m=machine, %r=os-release
     63  * %v=os-version, %t=tty, %h=hostname, %d=date and time
     64  */
     65 #undef USE_IM
     66 
     67 /* Used with login -p */
     68 #undef LOGIN_ARGS
     69 
     70 /* set this to a sensible login */
     71 #ifndef LOGIN_PATH
     72 #define LOGIN_PATH BINDIR "/login"
     73 #endif
     74 ])
     75 ])
     76