summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 6d056fec4..c8bdf38e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1061,6 +1061,25 @@ dnl has it in libc), or if libdl is needed to get it.
*)
;;
esac
+
+ # check whether struct kbd_repeat has the 'period' field.
+ # on kernels < 2.5.42 it's called 'rate' instead.
+ AC_TRY_COMPILE([
+#include <linux/kd.h>
+#ifdef __sparc__
+#include <asm/param.h>
+#include <asm/kbio.h>
+#endif
+],[
+int main () {
+ struct kbd_repeat k;
+ k.period = 0;
+ return 0;
+}],
+ [period_field="period"],
+ [period_field="rate"])
+ AC_DEFINE_UNQUOTED(LNX_KBD_PERIOD_NAME, [$period_field],
+ [Name of the period field in struct kbd_repeat])
;;
freebsd* | kfreebsd*-gnu)
XORG_OS="freebsd"