--- configure.orig	2014-12-01 11:37:01 UTC
+++ configure
@@ -13481,7 +13481,8 @@ fi
 for ac_header in errno.h signal.h stddef.h sys/types.h memory.h stdlib.h   \
                   string.h sys/stat.h sys/user.h sys/wait.h time.h math.h   \
                   unistd.h sys/resource.h sys/socket.h sys/sysctl.h fcntl.h \
-                  sys/param.h procfs.h
+                  sys/param.h procfs.h X11/extensions/scrnsaver.h \
+                  X11/extensions/XTest.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -13558,6 +13559,104 @@ fi
 
 
 # ===================================================== #
+# 		Check for XScreenSaverSuspend		#
+# ===================================================== #
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XScreenSaverSuspend in -lXss" >&5
+$as_echo_n "checking for XScreenSaverSuspend in -lXss... " >&6; }
+if ${ac_cv_lib_Xss_XScreenSaverSuspend+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXss  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XScreenSaverSuspend ();
+int
+main ()
+{
+return XScreenSaverSuspend ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_Xss_XScreenSaverSuspend=yes
+else
+  ac_cv_lib_Xss_XScreenSaverSuspend=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xss_XScreenSaverSuspend" >&5
+$as_echo "$ac_cv_lib_Xss_XScreenSaverSuspend" >&6; }
+if test "x$ac_cv_lib_Xss_XScreenSaverSuspend" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBXSS 1
+_ACEOF
+
+  LIBS="-lXss $LIBS"
+
+fi
+
+
+# ===================================================== #
+# 		Check for XTestFakeKeyEvent		#
+# ===================================================== #
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XTestFakeKeyEvent in -lXtst" >&5
+$as_echo_n "checking for XTestFakeKeyEvent in -lXtst... " >&6; }
+if ${ac_cv_lib_Xtst_XTestFakeKeyEvent+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXtst  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XTestFakeKeyEvent ();
+int
+main ()
+{
+return XTestFakeKeyEvent ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_Xtst_XTestFakeKeyEvent=yes
+else
+  ac_cv_lib_Xtst_XTestFakeKeyEvent=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xtst_XTestFakeKeyEvent" >&5
+$as_echo "$ac_cv_lib_Xtst_XTestFakeKeyEvent" >&6; }
+if test "x$ac_cv_lib_Xtst_XTestFakeKeyEvent" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBXTST 1
+_ACEOF
+
+  LIBS="-lXtst $LIBS"
+
+fi
+
+
+# ===================================================== #
 # 		Check for i18n support 			#
 # ===================================================== #
 
