+dnl --- Check for some useful functions ---
+
+AC_CHECK_FUNCS(setreuid getrusage vtimes)
+
+dnl --- Set default become style ---
+
+AC_ARG_ENABLE([style],
+[ --enable-style=STYLE set default style to preserve, su, or login],
+[case "$withval" in
+ preserve) style="l_preserve" ;;
+ su|user) style="l_user" ;;
+ login) style="l_login" ;;
+esac],
+[style="l_preserve"])
+AC_DEFINE_UNQUOTED(DEFAULT_LOGIN_STYLE, $style)
+
+dnl --- Set configuration directory ---
+
+AC_ARG_WITH([etcdir],
+[ --with-etcdir=PATH set directory for configuration and key files
+ [default is /etc/become]],
+[etcdir="$withval"], [etcdir="/etc/become"])
+AC_SUBST(etcdir)
+AC_DEFINE_UNQUOTED(ETCDIR, "$etcdir")
+