summaryrefslogtreecommitdiff
path: root/driver/xf86-input-keyboard/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'driver/xf86-input-keyboard/configure.ac')
-rw-r--r--driver/xf86-input-keyboard/configure.ac93
1 files changed, 32 insertions, 61 deletions
diff --git a/driver/xf86-input-keyboard/configure.ac b/driver/xf86-input-keyboard/configure.ac
index c26e4022e..f6ebb963d 100644
--- a/driver/xf86-input-keyboard/configure.ac
+++ b/driver/xf86-input-keyboard/configure.ac
@@ -20,55 +20,46 @@
#
# Process this file with autoconf to produce a configure script
-AC_PREREQ(2.57)
+# Initialize Autoconf
+AC_PREREQ([2.60])
AC_INIT([xf86-input-keyboard],
- 1.4.0,
+ [1.5.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
- xf86-input-keyboard)
-
-# Require xorg-macros version 1.3 or newer for XORG_DEFAULT_OPTIONS
-m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.3 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.3)
-
+ [xf86-input-keyboard])
AC_CONFIG_SRCDIR([Makefile.am])
+AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE([dist-bzip2])
+# Initialize Automake
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
-DRIVER_NAME=kbd
-AC_SUBST([DRIVER_NAME])
-
-AM_CONFIG_HEADER([config.h])
-
-# Checks for programs.
+# Initialize libtool
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
-AC_PROG_CC
-AH_TOP([#include "xorg-server.h"])
+# Initialize X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
+XORG_DEFAULT_OPTIONS
+
+# Obtain compiler/linker options from server and required extensions
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2.99.0] xproto inputproto)
+
+# Define a configure option for an alternate input module directory
+AC_ARG_WITH(xorg-module-dir,
+ AC_HELP_STRING([--with-xorg-module-dir=DIR],
+ [Default xorg module directory [[default=$libdir/xorg/modules]]]),
+ [moduledir="$withval"],
+ [moduledir="$libdir/xorg/modules"])
+inputdir=${moduledir}/input
+AC_SUBST(inputdir)
+# The keyboard driver code is O/S specific
case $host_os in
linux*)
IS_LINUX="yes"
- # 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* | netbsd* | openbsd*)
@@ -93,31 +84,11 @@ AM_CONDITIONAL(LINUX, [test "x$IS_LINUX" = xyes])
AM_CONDITIONAL(BSD, [test "x$IS_BSD" = xyes])
AM_CONDITIONAL(SOLARIS, [test "x$IS_SOLARIS" = xyes])
AM_CONDITIONAL(HURD, [test "x$IS_HURD" = xyes])
-AM_CONDITIONAL(SCO, [test "x$IS_SCO" = xyes])
-AC_ARG_WITH(xorg-module-dir,
- AC_HELP_STRING([--with-xorg-module-dir=DIR],
- [Default xorg module directory [[default=$libdir/xorg/modules]]]),
- [moduledir="$withval"],
- [moduledir="$libdir/xorg/modules"])
-AC_SUBST(moduledir)
-
-# Checks for extensions
-XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
-XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
-XORG_DRIVER_CHECK_EXT(XKB, kbproto)
-
-# Checks for pkg-config packages
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2.99.0] xproto $REQUIRED_MODULES)
-sdkdir=$(pkg-config --variable=sdkdir xorg-server)
-
-XORG_DEFAULT_OPTIONS
-XORG_CFLAGS="$CWARNFLAGS $XORG_CFLAGS"
-AC_SUBST([XORG_CFLAGS])
-
-# Checks for libraries.
-
-# Checks for header files.
-AC_HEADER_STDC
+DRIVER_NAME=kbd
+AC_SUBST([DRIVER_NAME])
-AC_OUTPUT([Makefile src/Makefile man/Makefile])
+AC_CONFIG_FILES([Makefile
+ src/Makefile
+ man/Makefile])
+AC_OUTPUT