-lwrap on NetBSD doesn't like not having some of its global variables defined, so linking it to anything but sshd is bad. This patch fixes Makefile.in and configure/configure.in to make this work. Thanks, David --- configure.orig Tue Dec 7 01:10:51 1999 +++ configure Wed Dec 8 12:46:12 1999 @@ -2242,7 +2242,7 @@ #define LIBWRAP 1 EOF - LIBS="$LIBS -lwrap" + LIBWRAP="-lwrap" fi @@ -2377,6 +2377,7 @@ s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g +s%@LIBWRAP@%$LIBWRAP%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g --- Makefile.in.orig Wed Dec 8 12:34:45 1999 +++ Makefile.in Wed Dec 8 12:35:16 1999 @@ -15,6 +15,7 @@ EXTRA_TARGETS=@GNOME_ASKPASS@ TARGETS=libssh.a ssh sshd ssh-add ssh-keygen ssh-agent scp $(EXTRA_TARGETS) LIBS=@LIBS@ +LIBWRAP=@LIBWRAP@ AR=@AR@ RANLIB=@RANLIB@ INSTALL=@INSTALL@ @@ -48,7 +49,7 @@ sshd: sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \ pty.o log-server.o login.o servconf.o serverloop.o bsd-login.o \ md5crypt.o libssh.a - $(CC) -o $@ $^ $(LFLAGS) $(LIBS) + $(CC) -o $@ $^ $(LFLAGS) $(LIBS) $(LIBWRAP) scp: scp.o libssh.a $(CC) -o $@ $^ $(LFLAGS) $(LIBS) --- configure.in.orig Wed Dec 8 12:53:00 1999 +++ configure.in Wed Dec 8 13:34:51 1999 @@ -269,9 +269,10 @@ [ --with-tcp-wrappers Enable tcpwrappers support], [ AC_DEFINE(LIBWRAP) - LIBS="$LIBS -lwrap" + LIBWRAP="-lwrap" ] ) +AC_SUBST(LIBWRAP) dnl Check whether to enable MD5 passwords AC_ARG_WITH(md5-passwords,