summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/cf/telnet.m4
blob: add065c3d89317500e85d44e7ecc530c8c3fe7aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
dnl
dnl $Id: telnet.m4,v 1.1 2002/08/28 19:19:01 joda Exp $
dnl
dnl stuff used by telnet

AC_DEFUN([rk_TELNET],[
AC_DEFINE(AUTHENTICATION, 1, 
	[Define if you want authentication support in telnet.])dnl
AC_DEFINE(ENCRYPTION, 1,
	[Define if you want encryption support in telnet.])dnl
AC_DEFINE(DES_ENCRYPTION, 1,
	[Define if you want to use DES encryption in telnet.])dnl
AC_DEFINE(DIAGNOSTICS, 1,
	[Define this to enable diagnostics in telnet.])dnl
AC_DEFINE(OLD_ENVIRON, 1,
	[Define this to enable old environment option in telnet.])dnl
if false; then
	AC_DEFINE(ENV_HACK, 1,
		[Define this if you want support for broken ENV_{VAR,VAL} telnets.])
fi

# Simple test for streamspty, based on the existance of getmsg(), alas
# this breaks on SunOS4 which have streams but BSD-like ptys
#
# And also something wierd has happend with dec-osf1, fallback to bsd-ptys

case "$host" in
*-*-aix3*|*-*-sunos4*|*-*-osf*|*-*-hpux1[[01]]*)
	;;
*)
	AC_CHECK_FUNC(getmsg)
	if test "$ac_cv_func_getmsg" = "yes"; then
		AC_CACHE_CHECK([if getmsg works], ac_cv_func_getmsg_works,
		AC_TRY_RUN([
			#include <stdio.h>
			#include <errno.h>

			int main()
			{
			  int ret;
			  ret = getmsg(open("/dev/null", 0), NULL, NULL, NULL);
			  if(ret < 0 && errno == ENOSYS)
			    return 1;
			  return 0;
			}
			], ac_cv_func_getmsg_works=yes, 
			ac_cv_func_getmsg_works=no,
			ac_cv_func_getmsg_works=no))
		if test "$ac_cv_func_getmsg_works" = "yes"; then
			AC_DEFINE(HAVE_GETMSG, 1,
				[Define if you have a working getmsg.])
			AC_DEFINE(STREAMSPTY, 1,
				[Define if you have streams ptys.])
		fi
	fi
	;;
esac

AH_BOTTOM([
#if defined(ENCRYPTION) && !defined(AUTHENTICATION)
#define AUTHENTICATION 1
#endif

/* Set this to the default system lead string for telnetd 
 * can contain %-escapes: %s=sysname, %m=machine, %r=os-release
 * %v=os-version, %t=tty, %h=hostname, %d=date and time
 */
#undef USE_IM

/* Used with login -p */
#undef LOGIN_ARGS

/* set this to a sensible login */
#ifndef LOGIN_PATH
#define LOGIN_PATH BINDIR "/login"
#endif
])
])
OpenPOWER on IntegriCloud