When you run configure with --with-pam, all programs, including ssh and other client progs, are linked with libpam. This is pointless because only sshd needs PAM, and it can become a real (albeit minor) problem if libpam is linked dynamically because the resulting binaries will not work without libpam.so.N even if they do not use it. My autoconf wizardry level is not high enough to provide a real patch but I suppose one should add a special AC_SUBST for libpam, change the action of AC_CHECK_LIB(pam, pam_set_item, , ...) to modify this special variable (rather than LIBS) and add this subst to sshd's rule in Makefile.in.
I've addressed this bug (and several others) in modifications i'm in the process of testing now. If all my machines build OK I'll commit in the morning.
Fixed 26 Feb 2002
Mass change of RESOLVED bugs to CLOSED