Index: conf/pam.irix
===================================================================
--- conf/pam.irix	(revision 8816)
+++ conf/pam.irix	(working copy)
@@ -1,3 +0,0 @@
-#%PAM-1.0
-auth	required	pam_unix.so shadow nodelay nullok
-account	required	pam_unix.so
Index: conf/pam.std.in
===================================================================
--- conf/pam.std.in	(revision 8816)
+++ conf/pam.std.in	(working copy)
@@ -1,2 +1,2 @@
-auth	required	@PAMMOD@ nullok shadow
+auth	required	@PAMMODAUTH@
 account	required	@PAMMOD@
Index: conf/Makefile
===================================================================
--- conf/Makefile	(revision 8816)
+++ conf/Makefile	(working copy)
@@ -90,7 +90,7 @@
 	done
 	-if test x$(PAMDIR) != x; then \
 		$(INSTALL_DIR) -m 755 $(BUILDROOT)$(PAMDIR); \
-		if test -r $(BUILDROOT)$(PAMDIR)/cups/$(PAMFILE) ; then \
+		if test -r $(BUILDROOT)$(PAMDIR)/cups ; then \
 			$(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups.N ; \
 		else \
 			$(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups ; \
Index: config-scripts/cups-pam.m4
===================================================================
--- config-scripts/cups-pam.m4	(revision 8816)
+++ config-scripts/cups-pam.m4	(working copy)
@@ -22,9 +22,10 @@
 fi
 
 PAMDIR=""
-PAMFILE=""
+PAMFILE="pam.std"
 PAMLIBS=""
 PAMMOD="pam_unknown.so"
+PAMMODAUTH="pam_unknown.so"
 
 if test x$enable_pam != xno; then
 	SAVELIBS="$LIBS"
@@ -60,7 +61,7 @@
 
 	case "$uname" in
 		Darwin*)
-			# Darwin, MacOS X
+			# Darwin/Mac OS X
 			if test "x$with_pam_module" != x; then
 				PAMFILE="pam.$with_pam_module"
 			elif test -f /usr/lib/pam/pam_opendirectory.so.2; then
@@ -70,26 +71,22 @@
 			fi
 			;;
 
-		IRIX)
-			# SGI IRIX
-			PAMFILE="pam.irix"
-			;;
-
 		*)
 			# All others; this test might need to be updated
 			# as Linux distributors move things around...
 			if test "x$with_pam_module" != x; then
 				PAMMOD="pam_${with_pam_module}.so"
-			else
-				for mod in pam_unix2.so pam_unix.so pam_pwdb.so; do
-					if test -f /lib/security/$mod; then
-						PAMMOD="$mod"
-						break;
-					fi
-				done
+			elif test -f /lib/security/pam_unix2.so; then
+				PAMMOD="pam_unix2.so"
+			elif test -f /lib/security/pam_unix.so; then
+				PAMMOD="pam_unix.so"
 			fi
 
-			PAMFILE="pam.std"
+			if test "x$PAMMOD" = xpam_unix.so; then
+				PAMMODAUTH="$PAMMOD shadow nodelay"
+			else
+				PAMMODAUTH="$PAMMOD nodelay"
+			fi
 			;;
 	esac
 fi
@@ -98,6 +95,7 @@
 AC_SUBST(PAMFILE)
 AC_SUBST(PAMLIBS)
 AC_SUBST(PAMMOD)
+AC_SUBST(PAMMODAUTH)
 
 dnl
 dnl End of "$Id$".
