+if test "$enable_locking" = yes; then
+ true
+elif test "$enable_locking" = no; then
+ cat >> confdefs.h <<\EOF
+#define NO_LOCKING 1
+EOF
+
+else
+ echo "error: must be yes or no: --enable-locking=$enable_locking"
+ exit 1
+fi
+
+
+
+# Check to see if we can lock Virtual-Terminal switching, but allow that
+# to be disabled at compile-time.
+#
+ac_vt_lockswitch=no
+# Check whether --enable-vt-locking or --disable-vt-locking was given.
+if test "${enable_vt_locking+set}" = set; then
+ enableval="$enable_vt_locking"
+ enable_vt_locking="$enableval"
+else
+ enable_vt_locking=yes
+fi
+
+if test "$enable_vt_locking" = yes; then
+
+ echo $ac_n "checking for the VT_LOCKSWITCH ioctl""... $ac_c" 1>&6
+echo "configure:6073: checking for the VT_LOCKSWITCH ioctl" >&5
+ if eval "test \"`echo '$''{'ac_cv_vt_lockswitch'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 6078 "configure"
+#include "confdefs.h"
+#include <fcntl.h>
+ #include <sys/ioctl.h>
+ #include <sys/vt.h>
+int main() {
+int x = VT_LOCKSWITCH; int y = VT_UNLOCKSWITCH;
+; return 0; }
+EOF
+if { (eval echo configure:6087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_vt_lockswitch=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_vt_lockswitch=no
+fi
+rm -f conftest*
+fi
+
+ ac_vt_lockswitch=$ac_cv_vt_lockswitch
+ echo "$ac_t""$ac_vt_lockswitch" 1>&6
+
+elif test "$enable_locking" = no; then
+ true
+else
+ echo "error: must be yes or no: --enable-vt-locking=$enable_vt_locking"
+ exit 1
+fi
+
+if test "$ac_vt_lockswitch" = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_VT_LOCKSWITCH 1
+EOF
+
+ # the VT_LOCKSWITCH ioctl can only be used when running as root.
+ # #### but it doesn't work yet, so don't worry about that for now.
+# need_setuid=yes
+fi
+
+
+
+if test "$enable_locking" = yes; then