From 7b8fa5f933eaa094255447f9a8880e460406d31b Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Sun, 24 Apr 2011 17:47:02 +0200 Subject: configure.ac: track upstreams updates to other input modules. Signed-off-by: Matthieu Herrb --- configure.ac | 69 +++++++++++++++++++++++++----------------------------------- src/ws.c | 2 +- 2 files changed, 30 insertions(+), 41 deletions(-) diff --git a/configure.ac b/configure.ac index 3845bca..614249a 100644 --- a/configure.ac +++ b/configure.ac @@ -20,46 +20,35 @@ # # Process this file with autoconf to produce a configure script -AC_PREREQ(2.57) +AC_PREREQ([2.60]) AC_INIT([xf86-input-ws], - 1.2.9.99, + [1.2.99.9], [http://www.openbsd.org/], - xf86-input-ws) + [xf86-input-ws]) AC_CONFIG_SRCDIR([Makefile.am]) +AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR(.) -AM_INIT_AUTOMAKE([foreign dist-bzip2]) +# Initialize Automake +AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE -DRIVER_NAME=ws -AC_SUBST([DRIVER_NAME]) - -# Require xorg-macros: XORG_DEFAULT_OPTIONS -m4_ifndef([XORG_MACROS_VERSION], - [m4_fatal([must install xorg-macros 1.3 or later before running autoco -nf/autogen])]) -XORG_MACROS_VERSION(1.3) -XORG_DEFAULT_OPTIONS - -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 -# -AC_ARG_ENABLE(XINPUT, AS_HELP_STRING([--enable-xinput], - [Build XInput support (default: yes)]), - [XINPUT=$enableval],[XINPUT=yes]) -AM_CONDITIONAL(XINPUT, test "x$XINPUT" = "xyes") -if test "x$XINPUT" = "xyes" ; then - AC_DEFINE(XINPUT,1,[Enable XInput support]) -fi +# Obtain compiler/linker options from server and required extensions +PKG_CHECK_MODULES(XORG, xorg-server 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]]]), @@ -68,21 +57,21 @@ AC_ARG_WITH(xorg-module-dir, inputdir=${moduledir}/input AC_SUBST(inputdir) -# Checks for extensions -# XORG_DRIVER_CHECK_EXT(RANDR, randrproto) -XORG_DRIVER_CHECK_EXT(XINPUT, inputproto) +# X Server SDK location is required to install evdev header files +# This location is also relayed in the xorg-evdev.pc file +sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` -# Checks for pkg-config packages -PKG_CHECK_MODULES(XORG, xorg-server xproto $REQUIRED_MODULES) -XORG_CFLAGS="$CWARNFLAGS $XORG_CFLAGS" -AC_ARG_WITH([sdkdir], [], - [sdkdir="$withval"], - [sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`]) +# Workaround overriding sdkdir to be able to create a tarball when user has no +# write permission in sdkdir. See DISTCHECK_CONFIGURE_FLAGS in Makefile.am +AC_ARG_WITH([sdkdir], [], [sdkdir="$withval"]) AC_SUBST([sdkdir]) -# Checks for libraries. +DRIVER_NAME=ws +AC_SUBST([DRIVER_NAME]) -# Checks for header files. -AC_HEADER_STDC +AC_CONFIG_FILES([Makefile + src/Makefile + man/Makefile + include/Makefile]) -AC_OUTPUT([Makefile src/Makefile man/Makefile include/Makefile]) +AC_OUTPUT diff --git a/src/ws.c b/src/ws.c index 19fbae9..e5c16a6 100644 --- a/src/ws.c +++ b/src/ws.c @@ -25,8 +25,8 @@ #include #include +#include #include - #include #include #include -- cgit v1.2.3