+dnl --- Set default become style ---
+
+AC_ARG_ENABLE([style],
+[ --enable-style=STYLE set default style to preserve, setuser, or login],
+[case "$enableval" in
+ preserve) style="l_preserve" ;;
+ su|setuser) style="l_setuser" ;;
+ login) style="l_login" ;;
+ *) AC_MSG_ERROR([unknown login style: choose preserve, setuser, or 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")
+
+AC_ARG_WITH([htmldir],
+[ --with-htmldir=PATH set directory for HTML documentation
+ [default is PREFIX/html/become]],
+[htmldir="$withval"], [htmldir="${prefix}/html/become"])
+AC_SUBST(htmldir)
+
+dnl --- Debugging stuff ---
+
+AC_ARG_WITH(electric-fence,
+[ --with-electric-fence link programs with Electric Fence],
+ [if test "$withval" = "yes"; then
+ AC_CHECK_LIB(efence, malloc)
+ fi])
+
+AC_ARG_ENABLE(debugging,
+[ --enable-debugging spews vast swathes of useless information],
+ [if test "$enableval" = "no"; then
+ AC_DEFINE(NDEBUG, 1)
+ fi],
+ AC_DEFINE(NDEBUG, 1))
+
+AC_ARG_ENABLE(tracing,
+[ --enable-tracing enable output of tracing information],
+ [if test "$enableval" = "yes"; then
+ AC_DEFINE(TRACING)
+ fi],
+ AC_DEFINE(TRACING))
+