Configure telnet using one script instead of four
authorKen Raeburn <raeburn@mit.edu>
Thu, 4 Mar 2004 10:25:12 +0000 (10:25 +0000)
committerKen Raeburn <raeburn@mit.edu>
Thu, 4 Mar 2004 10:25:12 +0000 (10:25 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16144 dc483132-0cff-0310-8789-dd5450dbe970

12 files changed:
src/appl/telnet/ChangeLog
src/appl/telnet/Makefile.in
src/appl/telnet/configure.in
src/appl/telnet/libtelnet/ChangeLog
src/appl/telnet/libtelnet/Makefile.in
src/appl/telnet/libtelnet/configure.in [deleted file]
src/appl/telnet/telnet/ChangeLog
src/appl/telnet/telnet/Makefile.in
src/appl/telnet/telnet/configure.in [deleted file]
src/appl/telnet/telnetd/ChangeLog
src/appl/telnet/telnetd/Makefile.in
src/appl/telnet/telnetd/configure.in [deleted file]

index c6dd9911d67ea2af5ed6f923eebbd3fd52639aab..a733c9999d10eb08541861af74a3130b3f3a0796 100644 (file)
@@ -1,3 +1,10 @@
+2004-03-04  Ken Raeburn  <raeburn@mit.edu>
+
+       * configure.in: Merged in code from subdir configure.in files.
+       Create the subdir Makefiles here.  Substitute TELNET_LIBS and
+       TELNETD_LIBS with the appropriate sets of libraries.
+       * Makefile.in (LOCAL_SUBDIRS): Set to list the subdirs.
+
 2003-01-07  Ken Raeburn  <raeburn@mit.edu>
 
        * Makefile.orig: Deleted.
index 2b9bd59ae11253259c78fea68a7a98abd6fce5ff..32e41551ff72d5b63d6e67b3fdac078542d8bafd 100644 (file)
@@ -2,3 +2,4 @@ thisconfigdir=.
 myfulldir=appl/telnet
 mydir=.
 BUILDTOP=$(REL)..$(S)..
+LOCAL_SUBDIRS=libtelnet telnet telnetd
index 9dccb58cac8bed128dce01ddc1cf3287c202e351..04e4499cb77dd457dddb0b18c72ebfddc47a52ff 100644 (file)
@@ -1,4 +1,174 @@
 AC_INIT(configure.in)
 CONFIG_RULES
-AC_CONFIG_SUBDIRS(libtelnet telnet telnetd)
-V5_AC_OUTPUT_MAKEFILE
+dnl AC_CONFIG_SUBDIRS(libtelnet telnet telnetd)
+dnl
+dnl from old libtelnet/configure.in, plus additional header & func checks
+dnl
+AC_REPLACE_FUNCS([strcasecmp strdup setsid strerror strftime getopt herror parsetos])
+AC_CHECK_FUNCS(setenv unsetenv getenv gettosbyname cgetent gettosbyname setupterm vsnprintf)
+AC_CHECK_HEADERS(stdlib.h string.h unistd.h arpa/nameser.h sys/select.h arpa/inet.h sys/filio.h curses.h utmp.h sys/time.h sys/tty.h sac.h sys/ptyvar.h sys/stream.h sys/utsname.h memory.h)
+if test $ac_cv_func_setenv = no || test $ac_cv_func_unsetenv = no \
+  || test $ac_cv_func_getenv = no; then
+  SETENVSRC=setenv.c
+  SETENVOBJ=setenv.o
+  AC_SUBST([SETENVSRC])
+  AC_SUBST([SETENVOBJ])
+  AC_DEFINE([NEED_SETENV])
+fi
+dnl
+KRB5_NEED_PROTO([#include <stdlib.h>],setenv)
+AC_C_CONST
+if test "$KRB4_LIB" = ''; then
+       AC_MSG_RESULT(No Kerberos 4 authentication)
+else
+       AC_MSG_RESULT(Kerberos 4 authentication enabled)
+       AC_DEFINE(KRB4)
+fi
+KRB5_BUILD_LIBRARY_STATIC
+KRB5_BUILD_LIBOBJS
+dnl
+old_LIBS="$LIBS"
+dnl
+dnl from old telnet/configure.in
+dnl
+AC_PROG_INSTALL
+AC_FUNC_VFORK
+AC_HEADER_STDARG
+case $krb5_cv_host in
+*-*-solaris*)
+       if test "$krb5_cv_prog_gcc" = yes; then
+               # Solaris 8 at least has curses.h that is noisy under gcc
+               ac_cv_header_curses_h=yes
+       fi
+       ;;
+esac
+dnl
+dnl On some systems, term.h requires curses.h inclusion
+AC_CHECK_HEADERS(term.h,,,dnl
+[#ifdef HAVE_CURSES_H
+#include <curses.h>
+#endif
+])
+dnl
+AC_CHECK_LIB(termcap,main,AC_DEFINE(TERMCAP)
+LIBS="$LIBS -ltermcap",
+  AC_CHECK_LIB(curses,setupterm,LIBS="$LIBS -lcurses",
+  AC_CHECK_LIB(ncurses,setupterm,LIBS="$LIBS -lncurses")
+))
+KRB5_AC_INET6
+AC_CHECK_HEADER(termios.h,AC_DEFINE(USE_TERMIO) ac_termio=1)
+if test -z "$ac_termio"; then
+AC_CHECK_HEADER(termio.h,AC_DEFINE(SYSV_TERMIO),ac_sysv_termio=1)
+if test -z "$ac_sysv_termio"; then
+  AC_MSG_CHECKING([for cc_t in termio.h])
+  AC_CACHE_VAL(krb_cv_type_cc_t,
+  [AC_TRY_LINK([cc_t],[#include <termio.h>],
+  [cc_t foo;],krb_cv_type_cc_t=yes,krb_cv_type_cc_t=no)])
+  AC_MSG_RESULT($krb_cv_type_cc_t)
+  if test $krb_cv_type_cc_t = no; then
+    AC_DEFINE(NO_CC_T)
+  fi
+fi
+fi
+KRB5_NEED_PROTO([#include <unistd.h>
+#include <stdlib.h>],parsetos,1)
+dnl
+KRB5_NEED_PROTO([#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>],herror,1)
+dnl
+CHECK_SIGNALS
+if test "$KRB4_LIB" = ''; then
+       AC_MSG_RESULT(No Kerberos 4 authentication)
+else
+       AC_MSG_RESULT(Kerberos 4 authentication enabled)
+       AC_DEFINE(KRB4)
+fi
+dnl
+KRB5_BUILD_PROGRAM
+dnl
+TELNET_LIBS="$LIBS"
+AC_SUBST(TELNET_LIBS)
+LIBS="$old_LIBS"
+dnl
+dnl from old telnetd/configure.in
+dnl
+dnl AC_PROG_INSTALL
+AC_CHECK_LIB(util,main)
+AC_CHECK_LIB(termcap,main,AC_DEFINE(TERMCAP)
+LIBS="$LIBS -ltermcap",
+  AC_CHECK_LIB(curses,setupterm,LIBS="$LIBS -lcurses",
+  AC_CHECK_LIB(ncurses,setupterm,LIBS="$LIBS -lncurses")
+))
+dnl ... whole termios.h/termio.h/NO_CC_T thing again ...
+AC_HEADER_TIME
+dnl KRB5_AC_INET6
+dnl
+dnl Test if speed_t needs to be defined
+AC_CACHE_CHECK([if speed_t is defined], krb5_cv_type_speed_t,
+[AC_TRY_COMPILE(dnl
+[#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#ifndef        USE_TERMIO
+#include <sgtty.h>
+#else
+# ifdef        SYSV_TERMIO
+# include <termio.h>
+# else
+# include <termios.h>
+# endif
+#endif
+],[speed_t termspeed],krb5_cv_type_speed_t=yes, krb5_cv_type_speed_t=no)])
+if test $krb5_cv_type_speed_t = no; then
+   AC_DEFINE(speed_t, int)
+fi;
+dnl
+dnl
+dnl Make our operating system-specific security checks and definitions for
+dnl login.
+dnl
+case $krb5_cv_host in
+*-*-hpux*)
+     broken_streams=yes
+     ;;
+*-*-linux*)
+     # Someday Linux may have a Streams user-level interface, so checking
+     # for sys/stream.h may not always work.  But I'm reasonably
+     # sure Linux will never require pushing magic streams modules onto 
+     # pty's! :-)   --- TYT
+     broken_streams=yes
+     ;;
+*-*-irix*)
+     # Irix doesn't have a working granpt, and more over
+     # you can't push anything onto a pty, so telnetd really
+     # Really wants to treat it as if it doesn't have streams
+     broken_streams=yes
+     ;;
+esac
+if test -z "$broken_streams" -a "$ac_cv_header_sys_stream_h" = yes; then
+    AC_CHECK_FUNC(grantpt,AC_DEFINE(STREAMSPTY))
+fi
+AC_MSG_CHECKING([if setpgrp takes two arguments])
+dnl
+AC_CACHE_VAL(krb5_cv_sys_setpgrp_two,
+[AC_TRY_LINK( 
+[#include <unistd.h>],[setpgrp(0,0)],
+krb5_cv_sys_setpgrp_two=yes,krb5_cv_sys_setpgrp_two=no)])
+AC_MSG_RESULT($krb5_cv_sys_setpgrp_two)
+if test $krb5_cv_sys_setpgrp_two = yes; then
+  AC_DEFINE(SETPGRP_TWOARG)
+fi
+dnl
+KRB5_NEED_PROTO([#include <stdlib.h>],unsetenv,1)
+dnl KRB5_NEED_PROTO([#include <stdlib.h>],setenv,1)
+dnl KRB5_BUILD_PROGRAM
+dnl
+TELNETD_LIBS="$LIBS"
+AC_SUBST(TELNETD_LIBS)
+LIBS="$old_LIBS"
+dnl
+V5_AC_OUTPUT_MAKEFILE(. libtelnet telnet telnetd)
index 4f9de7ade67f10e1259470d0526325e91735b89e..ee96ebf12bb93295fc320ad53fc05b9fd31eb149 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-04  Ken Raeburn  <raeburn@mit.edu>
+
+       * configure.in: Deleted; configure this dir from parent now.
+       * Makefile.in (thisconfigdir, mydir): Updated.
+
 2003-05-09  Tom Yu  <tlyu@mit.edu>
 
        * kerberos5.c (kerberos5_send): Rename getlocalsubkey ->
index 783415b3183874561120c6f8f025364a59033736..80fcabf8c8c0bf12a808623f6df16aaa612b29c2 100644 (file)
@@ -1,6 +1,6 @@
-thisconfigdir=.
+thisconfigdir=..
 myfulldir=appl/telnet/libtelnet
-mydir=.
+mydir=libtelnet
 BUILDTOP=$(REL)..$(S)..$(S)..
 # derived from the original Makefile.generic
 #
diff --git a/src/appl/telnet/libtelnet/configure.in b/src/appl/telnet/libtelnet/configure.in
deleted file mode 100644 (file)
index 8767cd7..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-AC_INIT(auth.c)
-CONFIG_RULES
-AC_REPLACE_FUNCS([strcasecmp strdup setsid strerror strftime getopt herror parsetos])
-AC_CHECK_FUNCS(setenv unsetenv getenv gettosbyname cgetent)
-AC_CHECK_HEADERS(stdlib.h string.h unistd.h)
-if test $ac_cv_func_setenv = no || test $ac_cv_func_unsetenv = no \
-  || test $ac_cv_func_getenv = no; then
-  SETENVSRC=setenv.c
-  SETENVOBJ=setenv.o
-  AC_SUBST([SETENVSRC])
-  AC_SUBST([SETENVOBJ])
-  AC_DEFINE([NEED_SETENV])
-fi
-dnl
-KRB5_NEED_PROTO([#include <stdlib.h>],setenv)
-AC_C_CONST
-if test "$KRB4_LIB" = ''; then
-       AC_MSG_RESULT(No Kerberos 4 authentication)
-else
-       AC_MSG_RESULT(Kerberos 4 authentication enabled)
-       AC_DEFINE(KRB4)
-fi
-KRB5_BUILD_LIBRARY_STATIC
-KRB5_BUILD_LIBOBJS
-V5_AC_OUTPUT_MAKEFILE
index 60f9bf1f06781ac2caaa3f519ba75db5d689060b..91d52591a0788fefbae13ceb22d62342271debae 100644 (file)
@@ -1,3 +1,9 @@
+2004-03-04  Ken Raeburn  <raeburn@mit.edu>
+
+       * configure.in: Deleted; configure this dir from parent now.
+       * Makefile.in (thisconfigdir, mydir): Updated.
+       (LIBS): Define from @TELNET_LIBS@.
+
 2003-04-23  Ken Raeburn  <raeburn@mit.edu>
 
        * externs.h: Don't declare errno.
index 20a9ae75506f84c3ccff8ee344259f6944f611bc..59ea1e0ca88e7125949d2d4569c606cdf133fbfa 100644 (file)
@@ -1,6 +1,6 @@
-thisconfigdir=.
+thisconfigdir=..
 myfulldir=appl/telnet/telnet
-mydir=.
+mydir=telnet
 BUILDTOP=$(REL)..$(S)..$(S)..
 # derived from the original Makefile.generic
 #
@@ -33,6 +33,8 @@ ARPA_TELNET= $(srcdir)/../arpa/telnet.h
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
 
+LIBS=  @TELNET_LIBS@
+
 SRCS=  $(srcdir)/authenc.c $(srcdir)/commands.c $(srcdir)/main.c $(srcdir)/network.c $(srcdir)/ring.c \
        $(srcdir)/sys_bsd.c $(srcdir)/telnet.c $(srcdir)/terminal.c \
        $(srcdir)/utilities.c $(GETOPT_SRC)
diff --git a/src/appl/telnet/telnet/configure.in b/src/appl/telnet/telnet/configure.in
deleted file mode 100644 (file)
index c2fbd63..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-AC_INIT(telnet.c)
-CONFIG_RULES
-AC_PROG_INSTALL
-AC_FUNC_VFORK
-AC_HEADER_STDARG
-case $krb5_cv_host in
-*-*-solaris*)
-       if test "$krb5_cv_prog_gcc" = yes; then
-               # Solaris 8 at least has curses.h that is noisy under gcc
-               ac_cv_header_curses_h=yes
-       fi
-       ;;
-esac
-AC_CHECK_HEADERS(string.h arpa/nameser.h unistd.h sys/select.h stdlib.h arpa/inet.h sys/filio.h curses.h)
-dnl
-dnl On some systems, term.h requires curses.h inclusion
-AC_CHECK_HEADERS(term.h,,,dnl
-[#ifdef HAVE_CURSES_H
-#include <curses.h>
-#endif
-])
-dnl
-AC_CHECK_LIB(termcap,main,AC_DEFINE(TERMCAP)
-LIBS="$LIBS -ltermcap",
-  AC_CHECK_LIB(curses,setupterm,LIBS="$LIBS -lcurses",
-  AC_CHECK_LIB(ncurses,setupterm,LIBS="$LIBS -lncurses")
-))
-KRB5_AC_INET6
-AC_CHECK_FUNCS(gettosbyname setupterm)
-AC_CHECK_HEADER(termios.h,AC_DEFINE(USE_TERMIO) ac_termio=1)
-if test -z "$ac_termio"; then
-AC_CHECK_HEADER(termio.h,AC_DEFINE(SYSV_TERMIO),ac_sysv_termio=1)
-if test -z "$ac_sysv_termio"; then
-  AC_MSG_CHECKING([for cc_t in termio.h])
-  AC_CACHE_VAL(krb_cv_type_cc_t,
-  [AC_TRY_LINK([cc_t],[#include <termio.h>],
-  [cc_t foo;],krb_cv_type_cc_t=yes,krb_cv_type_cc_t=no)])
-  AC_MSG_RESULT($krb_cv_type_cc_t)
-  if test $krb_cv_type_cc_t = no; then
-    AC_DEFINE(NO_CC_T)
-  fi
-fi
-fi
-KRB5_NEED_PROTO([#include <unistd.h>
-#include <stdlib.h>],parsetos,1)
-dnl
-KRB5_NEED_PROTO([#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>],herror,1)
-dnl
-CHECK_SIGNALS
-if test "$KRB4_LIB" = ''; then
-       AC_MSG_RESULT(No Kerberos 4 authentication)
-else
-       AC_MSG_RESULT(Kerberos 4 authentication enabled)
-       AC_DEFINE(KRB4)
-fi
-dnl
-KRB5_BUILD_PROGRAM
-V5_AC_OUTPUT_MAKEFILE
index b343e9cc0d7733b3d4c2babc24567f71ea94f8df..d1b44c7023e785d764ed0c8e65efbac8289304da 100644 (file)
@@ -1,3 +1,9 @@
+2004-03-04  Ken Raeburn  <raeburn@mit.edu>
+
+       * configure.in: Deleted; configure this dir from parent now.
+       * Makefile.in (thisconfigdir, mydir): Updated.
+       (LIBS): Define from @TELNETD_LIBS@.
+
 2003-04-23  Ken Raeburn  <raeburn@mit.edu>
 
        * telnetd.h: Don't declare errno.
index 4fa637b745b3777b9d41c7a267f9d2adbd28eedf..40fdbefc603fb2079f701771e29bdf15608b68f0 100644 (file)
@@ -1,6 +1,6 @@
-thisconfigdir=.
+thisconfigdir=..
 myfulldir=appl/telnet/telnetd
-mydir=.
+mydir=telnetd
 BUILDTOP=$(REL)..$(S)..$(S)..
 # derived from the original Makefile.generic
 #
@@ -33,6 +33,8 @@ ARPA_TELNET= $(srcdir)/../arpa/telnet.h
 PROG_LIBPATH=-L$(TOPLIBD) $(KRB4_LIBPATH)
 PROG_RPATH=$(KRB5_LIBDIR)
 
+LIBS=  @TELNETD_LIBS@
+
 SRCS=  $(srcdir)/telnetd.c \
        $(srcdir)/termio-tn.c \
        $(srcdir)/termios-tn.c \
diff --git a/src/appl/telnet/telnetd/configure.in b/src/appl/telnet/telnetd/configure.in
deleted file mode 100644 (file)
index 7e5780d..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-AC_INIT(telnetd.c)
-CONFIG_RULES
-AC_PROG_INSTALL
-AC_CHECK_LIB(util,main)
-AC_CHECK_LIB(termcap,main,AC_DEFINE(TERMCAP)
-LIBS="$LIBS -ltermcap",
-  AC_CHECK_LIB(curses,setupterm,LIBS="$LIBS -lcurses",
-  AC_CHECK_LIB(ncurses,setupterm,LIBS="$LIBS -lncurses")
-))
-AC_CHECK_HEADER(termios.h,AC_DEFINE(USE_TERMIO) ac_termio=1)
-if test -z "$ac_termio"; then
-AC_CHECK_HEADER(termio.h,AC_DEFINE(SYSV_TERMIO),ac_sysv_termio=1)
-if test -z "$ac_sysv_termio"; then
-  AC_MSG_CHECKING([for cc_t in termio.h])
-  AC_CACHE_VAL(krb_cv_type_cc_t,
-  [AC_TRY_LINK([cc_t],[#include <termio.h>],
-  [cc_t foo;],krb_cv_type_cc_t=yes,krb_cv_type_cc_t=no)])
-  AC_MSG_RESULT($krb_cv_type_cc_t)
-  if test $krb_cv_type_cc_t = no; then
-    AC_DEFINE(NO_CC_T)
-  fi
-fi
-fi
-AC_HEADER_TIME
-AC_CHECK_HEADERS(string.h arpa/nameser.h utmp.h sys/time.h sys/tty.h sac.h sys/ptyvar.h sys/filio.h sys/stream.h sys/utsname.h memory.h)
-AC_CHECK_FUNCS(gettosbyname vsnprintf)
-KRB5_AC_INET6
-dnl
-dnl Test if speed_t needs to be defined
-AC_CACHE_CHECK([if speed_t is defined], krb5_cv_type_speed_t,
-[AC_TRY_COMPILE(dnl
-[#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#ifndef        USE_TERMIO
-#include <sgtty.h>
-#else
-# ifdef        SYSV_TERMIO
-# include <termio.h>
-# else
-# include <termios.h>
-# endif
-#endif
-],[speed_t termspeed],krb5_cv_type_speed_t=yes, krb5_cv_type_speed_t=no)])
-if test $krb5_cv_type_speed_t = no; then
-   AC_DEFINE(speed_t, int)
-fi;
-dnl
-dnl
-dnl Make our operating system-specific security checks and definitions for
-dnl login.
-dnl
-case $krb5_cv_host in
-*-*-hpux*)
-     broken_streams=yes
-     ;;
-*-*-linux*)
-     # Someday Linux may have a Streams user-level interface, so checking
-     # for sys/stream.h may not always work.  But I'm reasonably
-     # sure Linux will never require pushing magic streams modules onto 
-     # pty's! :-)   --- TYT
-     broken_streams=yes
-     ;;
-*-*-irix*)
-     # Irix doesn't have a working granpt, and more over
-     # you can't push anything onto a pty, so telnetd really
-     # Really wants to treat it as if it doesn't have streams
-     broken_streams=yes
-     ;;
-esac
-if test -z "$broken_streams" -a "$ac_cv_header_sys_stream_h" = yes; then
-    AC_CHECK_FUNC(grantpt,AC_DEFINE(STREAMSPTY))
-fi
-AC_MSG_CHECKING([if setpgrp takes two arguments])
-dnl
-AC_CACHE_VAL(krb5_cv_sys_setpgrp_two,
-[AC_TRY_LINK( 
-[#include <unistd.h>],[setpgrp(0,0)],
-krb5_cv_sys_setpgrp_two=yes,krb5_cv_sys_setpgrp_two=no)])
-AC_MSG_RESULT($krb5_cv_sys_setpgrp_two)
-if test $krb5_cv_sys_setpgrp_two = yes; then
-  AC_DEFINE(SETPGRP_TWOARG)
-fi
-dnl
-KRB5_NEED_PROTO([#include <stdlib.h>],unsetenv,1)
-KRB5_NEED_PROTO([#include <stdlib.h>],setenv,1)
-KRB5_BUILD_PROGRAM
-V5_AC_OUTPUT_MAKEFILE