+test "x$with_root_environ" = xyes && AC_DEFINE(USE_ROOT_ENVIRON,1,[Define to 1 if root/setuid application is allowed to use ncurses environment])
+
+AC_MSG_CHECKING(if you want to permit setuid programs to access all files)
+AC_ARG_ENABLE(root-access,
+ [ --disable-root-access restrict file-access when running setuid],
+ [with_root_access=$enableval],
+ [with_root_access=yes])
+AC_MSG_RESULT($with_root_access)
+test "x$with_root_access" = xyes && AC_DEFINE(USE_ROOT_ACCESS,1,[Define to 1 if setuid is allowed all file-access])
+
+AC_MSG_CHECKING(if you want to permit setuid use of ncurses environment variables)
+AC_ARG_ENABLE(setuid-environ,
+ [ --disable-setuid-environ restrict setuid use of ncurses environment variables],
+ [with_setuid_environ=$enableval],
+ [with_setuid_environ=$with_root_environ])
+AC_MSG_RESULT($with_setuid_environ)
+test "x$with_setuid_environ" = xyes && AC_DEFINE(USE_SETUID_ENVIRON,1,[Define to 1 if setuid/setgid application is allowed to use ncurses environment])