Subject: Re: libtelnet func signature change
To: Johan Danielsson <joda@pdc.kth.se>
From: Jun-ichiro itojun Hagino <itojun@iijlab.net>
List: tech-userlevel
Date: 07/16/2003 03:34:11
>> i guess our life is much easier if we stop using libtelnet and
>> compile them under libexec/telnetd and usr.bin/telnet...
>Yes. I don't see the value of a separate libtelnet either.

	does it seem sensible?

itojun


Index: usr.bin/telnet/Makefile
===================================================================
RCS file: /cvsroot/src/usr.bin/telnet/Makefile,v
retrieving revision 1.28
diff -u -r1.28 Makefile
--- usr.bin/telnet/Makefile	2003/07/14 15:56:28	1.28
+++ usr.bin/telnet/Makefile	2003/07/15 18:33:27
@@ -41,8 +41,8 @@
 CPPFLAGS+=-DTERMCAP -DKLUDGELINEMODE -DUSE_TERMIO -DENV_HACK
 CPPFLAGS+=-I${.CURDIR}
 
-LDADD+= -ltermcap -ltelnet
-DPADD+=	${LIBTERMCAP} ${LIBTELNET}
+LDADD+= -ltermcap #-ltelnet
+DPADD+=	${LIBTERMCAP} #${LIBTELNET}
 
 SRCS=	authenc.c commands.c main.c network.c ring.c sys_bsd.c telnet.c \
 	terminal.c tn3270.c utilities.c
@@ -54,12 +54,24 @@
 DPADD+=	${LIBIPSEC}
 CPPFLAGS+=-DINET6
 
+# libtelnet
+SRCS+=	auth.c encrypt.c genget.c getent.c misc.c
+CPPFLAGS+=-DHAS_CGETENT -I${NETBSDSRCDIR}/lib/libtelnet
+
+.PATH: ${NETBSDSRCDIR}/lib/libtelnet
+
 .if (${USE_KERBEROS} != "no")
 CPPFLAGS+=-DAUTHENTICATION -DENCRYPTION -DKRB4
 CPPFLAGS+=-DKRB5 -DFORWARD
 
 LDADD+= -lkrb5 -lkrb -lcrypto -lasn1 -lcom_err -lroken
 DPADD+=	${LIBKRB5} ${LIBKRB} ${LIBCRYPTO} ${LIBASN1} ${LIBCOM_ERR} ${LIBROKEN}
+
+# libtelnet
+SRCS+=	enc_des.c kerberos.c kerberos5.c
+CPPFLAGS+=-DDES_ENCRYPTION
+CPPFLAGS+=-I${DESTDIR}/usr/include/krb5
+CPPFLAGS+=-I${DESTDIR}/usr/include/kerberosIV
 .endif
 
 .include <bsd.prog.mk>
Index: libexec/telnetd/Makefile
===================================================================
RCS file: /cvsroot/src/libexec/telnetd/Makefile,v
retrieving revision 1.34
diff -u -r1.34 Makefile
--- libexec/telnetd/Makefile	2003/07/14 15:55:53	1.34
+++ libexec/telnetd/Makefile	2003/07/15 18:33:27
@@ -10,12 +10,18 @@
 CPPFLAGS+=-DOLD_ENVIRON -DENV_HACK -DSECURELOGIN -DSUPPORT_UTMP -DSUPPORT_UTMPX
 SRCS=	authenc.c global.c slc.c state.c sys_term.c telnetd.c \
 	termstat.c utility.c
-DPADD=	${LIBUTIL} ${LIBTERMCAP} ${LIBTELNET}
-LDADD+=	-lutil -ltermcap -ltelnet
+DPADD=	${LIBUTIL} ${LIBTERMCAP} #${LIBTELNET}
+LDADD+=	-lutil -ltermcap #-ltelnet
 
 CPPFLAGS+=-I${NETBSDSRCDIR}/lib
 CPPFLAGS+=-I${.CURDIR}
 
+# libtelnet
+SRCS+=	auth.c encrypt.c genget.c getent.c misc.c
+CPPFLAGS+=-DHAS_CGETENT -I${NETBSDSRCDIR}/lib/libtelnet
+
+.PATH: ${NETBSDSRCDIR}/lib/libtelnet
+
 .if (${USE_KERBEROS} != "no")
 CPPFLAGS+=-DAUTHENTICATION -DENCRYPTION
 CPPFLAGS+=-I${DESTDIR}/usr/include/krb5
@@ -25,6 +31,12 @@
 
 LDADD+=	-lkrb5 -lkrb -lcrypto -lasn1 -lcom_err -L${VERS} -lvers -lroken
 DPADD+=	${LIBKRB5} ${LIBKRB} ${LIBCRYPTO} ${LIBASN1} ${LIBCOM_ERR} ${LIBROKEN}
+
+# libtelnet
+SRCS+=	enc_des.c kerberos.c kerberos5.c
+CPPFLAGS+=-DDES_ENCRYPTION
+CPPFLAGS+=-I${DESTDIR}/usr/include/krb5
+CPPFLAGS+=-I${DESTDIR}/usr/include/kerberosIV
 .endif
 
 .include <bsd.prog.mk>