1240a9a23Smbalmer#  Copyright 2005 Adam Jackson.
2240a9a23Smbalmer#
3240a9a23Smbalmer#  Permission is hereby granted, free of charge, to any person obtaining a
4240a9a23Smbalmer#  copy of this software and associated documentation files (the "Software"),
5240a9a23Smbalmer#  to deal in the Software without restriction, including without limitation
6240a9a23Smbalmer#  on the rights to use, copy, modify, merge, publish, distribute, sub
7240a9a23Smbalmer#  license, and/or sell copies of the Software, and to permit persons to whom
8240a9a23Smbalmer#  the Software is furnished to do so, subject to the following conditions:
9240a9a23Smbalmer#
10240a9a23Smbalmer#  The above copyright notice and this permission notice (including the next
11240a9a23Smbalmer#  paragraph) shall be included in all copies or substantial portions of the
12240a9a23Smbalmer#  Software.
13240a9a23Smbalmer#
14240a9a23Smbalmer#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15240a9a23Smbalmer#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16240a9a23Smbalmer#  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
17240a9a23Smbalmer#  ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18240a9a23Smbalmer#  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19240a9a23Smbalmer#  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20240a9a23Smbalmer#
21240a9a23Smbalmer# Process this file with autoconf to produce a configure script
22240a9a23Smbalmer
23c57823e8SmrgAC_PREREQ([2.60])
24240a9a23SmbalmerAC_INIT([xf86-input-ws],
25c57823e8Smrg        [1.3.0],
26240a9a23Smbalmer        [http://www.openbsd.org/],
27c57823e8Smrg        [xf86-input-ws])
28240a9a23Smbalmer
29240a9a23SmbalmerAC_CONFIG_SRCDIR([Makefile.am])
30c57823e8SmrgAC_CONFIG_HEADERS([config.h])
31240a9a23SmbalmerAC_CONFIG_AUX_DIR(.)
32240a9a23Smbalmer
33c57823e8Smrg# Initialize Automake
34c57823e8SmrgAM_INIT_AUTOMAKE([foreign dist-bzip2])
35240a9a23SmbalmerAM_MAINTAINER_MODE
36240a9a23Smbalmer
37c57823e8Smrg# Initialize libtool
38240a9a23SmbalmerAC_DISABLE_STATIC
39240a9a23SmbalmerAC_PROG_LIBTOOL
40240a9a23Smbalmer
41c57823e8Smrg# Initialize X.Org macros 1.8 or later for MAN_SUBSTS set by 
42c57823e8Smrg# XORG_MANPAGE_SECTIONS
43c57823e8Smrgm4_ifndef([XORG_MACROS_VERSION], 
44c57823e8Smrg          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
45c57823e8SmrgXORG_MACROS_VERSION(1.8)
46c57823e8SmrgXORG_DEFAULT_OPTIONS
47240a9a23Smbalmer
48c57823e8Smrg# Obtain compiler/linker options from server and required extensions
49c57823e8SmrgPKG_CHECK_MODULES(XORG, xorg-server xproto inputproto)
50240a9a23Smbalmer
51c57823e8Smrg# Define a configure option for an alternate input module directory
52240a9a23SmbalmerAC_ARG_WITH(xorg-module-dir,
53240a9a23Smbalmer            AC_HELP_STRING([--with-xorg-module-dir=DIR],
54240a9a23Smbalmer                           [Default xorg module directory [[default=$libdir/xorg/modules]]]),
55240a9a23Smbalmer            [moduledir="$withval"],
56240a9a23Smbalmer            [moduledir="$libdir/xorg/modules"])
57240a9a23Smbalmerinputdir=${moduledir}/input
58240a9a23SmbalmerAC_SUBST(inputdir)
59240a9a23Smbalmer
60c57823e8Smrg# X Server SDK location is required to install evdev header files
61c57823e8Smrg# This location is also relayed in the xorg-evdev.pc file
62c57823e8Smrgsdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
63240a9a23Smbalmer
64c57823e8Smrg# Workaround overriding sdkdir to be able to create a tarball when user has no
65c57823e8Smrg# write permission in sdkdir. See DISTCHECK_CONFIGURE_FLAGS in Makefile.am
66c57823e8SmrgAC_ARG_WITH([sdkdir], [], [sdkdir="$withval"])
67240a9a23SmbalmerAC_SUBST([sdkdir])
68240a9a23Smbalmer
69c57823e8SmrgDRIVER_NAME=ws
70c57823e8SmrgAC_SUBST([DRIVER_NAME])
71240a9a23Smbalmer
72c57823e8SmrgAC_CONFIG_FILES([Makefile
73c57823e8Smrg		src/Makefile
74c57823e8Smrg	   	man/Makefile
75c57823e8Smrg	   	include/Makefile])
76240a9a23Smbalmer
77c57823e8SmrgAC_OUTPUT
78