blob: 8043a538aa7bbaa1306955f1da1c0eb011b29729 [file] [log] [blame]
Daniel Kurtz9f02b922011-06-04 19:21:121# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4#
5# Copyright 2005 Adam Jackson.
6#
7# Permission is hereby granted, free of charge, to any person obtaining a
8# copy of this software and associated documentation files (the "Software"),
9# to deal in the Software without restriction, including without limitation
10# on the rights to use, copy, modify, merge, publish, distribute, sub
11# license, and/or sell copies of the Software, and to permit persons to whom
12# the Software is furnished to do so, subject to the following conditions:
13#
14# The above copyright notice and this permission notice (including the next
15# paragraph) shall be included in all copies or substantial portions of the
16# Software.
17#
18# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
21# ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
22# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24#
25# Process this file with autoconf to produce a configure script
26
27# Initialize Autoconf
28AC_PREREQ([2.60])
29AC_INIT([xf86-input-cmt],
30 [0.0.1],
31 [http://crosbug.com/],
32 [xf86-input-cmt])
33AC_CONFIG_SRCDIR([Makefile.am])
34AC_CONFIG_HEADERS([config.h])
35AC_CONFIG_AUX_DIR(.)
36
37# Initialize Automake
38AM_INIT_AUTOMAKE([foreign dist-bzip2])
39AM_MAINTAINER_MODE
40
41# Initialize libtool
42AC_DISABLE_STATIC
43AC_PROG_LIBTOOL
44
45# Initialize X.Org macros >=1.8 for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
46m4_ifndef([XORG_MACROS_VERSION],
47 [m4_fatal([must install xorg-macros 1.8 or later before running \
48 autoconf/autogen])])
49XORG_MACROS_VERSION(1.8)
50XORG_DEFAULT_OPTIONS
51
52# Obtain compiler/linker options from server and required extensions
53PKG_CHECK_MODULES(XORG, xorg-server xproto inputproto)
54
55# Define a configure option for an alternate input module directory
56AC_ARG_WITH(xorg-module-dir,
57 AC_HELP_STRING([--with-xorg-module-dir=DIR],
58 [Default xorg module directory
59 [[default=$libdir/xorg/modules]]]),
60 [moduledir="$withval"],
61 [moduledir="$libdir/xorg/modules"])
62inputdir=${moduledir}/input
63AC_SUBST(inputdir)
64
65# X Server SDK location is required to install driver header files
66# This location is also relayed in the xorg-*.pc file
67sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
68
69# Workaround overriding sdkdir to be able to create a tarball when user has no
70# write permission in sdkdir. See DISTCHECK_CONFIGURE_FLAGS in Makefile.am
71AC_ARG_WITH([sdkdir], [], [sdkdir="$withval"])
72AC_SUBST([sdkdir])
73
74DRIVER_NAME=cmt
75AC_SUBST([DRIVER_NAME])
76
77AC_CONFIG_FILES([Makefile
78 src/Makefile
Daniel Kurtz69baa172011-06-04 01:31:2279 include/Makefile
Daniel Kurtz13686012011-06-04 01:32:5780 man/Makefile
Daniel Kurtz9f02b922011-06-04 19:21:1281 xorg-cmt.pc])
82AC_OUTPUT