--enable-debug enable debugging
--enable-static prepare for static build
- --without-pam disable pam support
- --without-shadow disable shadow support
-
--with-timestamp enable timestamp support
--without-insults disable insults
--target) TARGET=$var ;;
--enable-debug) DEBUG=yes ;;
--enable-static) BUILD_STATIC=yes ;;
- --with-pam) WITHOUT_PAM=; WITHOUT_SHADOW=yes ;;
- --with-shadow) WITHOUT_SHADOW=; WITHOUT_PAM=yes ;;
- --without-pam) WITHOUT_PAM=yes ;;
- --without-shadow) WITHOUT_SHADOW=yes ;;
--without-insults) WITHOUT_INSULTS=yes ;;
--with-timestamp) WITHOUT_TIMESTAMP= ;;
--without-timestamp) WITHOUT_TIMESTAMP=yes ;;
}
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
+printf 'SRCS += shadow.c\n' >>$CONFIG_MK
+printf 'LDLIBS += -lcrypt\n' >>$CONFIG_MK
+return 0
}
definsults() {
}
auth=$(authmethod)
-if [ $? -eq 0 ]; then
- printf 'Using auth method\t\t\t%s.\n' "$auth" >&2
-else
- printf 'Error auth method\t\t\n' >&2
- exit 1
-fi
insults=$(definsults)