/crypto/heimdal/cf/telnet.m4

https://bitbucket.org/freebsd/freebsd-head/ · m4 · 78 lines · 56 code · 8 blank · 14 comment · 0 complexity · 01fb94846186bb5a5576ecd6eb69a9de MD5 · raw file

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