+authmethod() {
+ #
+ # Check for pam_appl.h.
+ #
+ src='
+#include <security/pam_appl.h>
+int main(void) {
+ return 0;
+}'
+ [ -z "$WITHOUT_PAM" ] && check_func "pam_appl_h" "$src" && {
+ printf 'SRCS += pam.c\n' >>$CONFIG_MK
+ printf 'LDLIBS += -lpam\n' >>$CONFIG_MK
+ printf '#define USE_PAM\n' >>$CONFIG_H
+ printf 'pam\n'
+ return 0
+ }
+
+ #
+ # Check for shadow.h.
+ #
+ src='
+#include <shadow.h>
+int main(void) {
+ return 0;
+}'
+ [ -z "$WITHOUT_SHADOW" ] && check_func "shadow_h" "$src" && {
+ printf 'SRCS += shadow.c\n' >>$CONFIG_MK
+ printf 'LDLIBS += -lcrypt\n' >>$CONFIG_MK
+ printf '#define USE_SHADOW\n' >>$CONFIG_H
+ printf 'shadow\n'
+ return 0
+ }
+
+ return 1
+}
+
+persistmethod() {
+ [ -z "$WITHOUT_TIMESTAMP" ] && {
+ printf '#define USE_TIMESTAMP\n' >>$CONFIG_H
+ printf 'SRCS += timestamp.c\n' >>$CONFIG_MK
+ printf 'timestamp\n'
+ return 0
+ }
+ return 1
+}
+
+#
+# Check for explicit_bzero().
+#