Daniel Kurtz | 9f02b92 | 2011-06-04 19:21:12 | [diff] [blame] | 1 | # 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 |
| 28 | AC_PREREQ([2.60]) |
| 29 | AC_INIT([xf86-input-cmt], |
| 30 | [0.0.1], |
| 31 | [http://crosbug.com/], |
| 32 | [xf86-input-cmt]) |
| 33 | AC_CONFIG_SRCDIR([Makefile.am]) |
| 34 | AC_CONFIG_HEADERS([config.h]) |
| 35 | AC_CONFIG_AUX_DIR(.) |
| 36 | |
| 37 | # Initialize Automake |
| 38 | AM_INIT_AUTOMAKE([foreign dist-bzip2]) |
| 39 | AM_MAINTAINER_MODE |
| 40 | |
| 41 | # Initialize libtool |
| 42 | AC_DISABLE_STATIC |
| 43 | AC_PROG_LIBTOOL |
| 44 | |
| 45 | # Initialize X.Org macros >=1.8 for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS |
| 46 | m4_ifndef([XORG_MACROS_VERSION], |
| 47 | [m4_fatal([must install xorg-macros 1.8 or later before running \ |
| 48 | autoconf/autogen])]) |
| 49 | XORG_MACROS_VERSION(1.8) |
| 50 | XORG_DEFAULT_OPTIONS |
| 51 | |
| 52 | # Obtain compiler/linker options from server and required extensions |
| 53 | PKG_CHECK_MODULES(XORG, xorg-server xproto inputproto) |
| 54 | |
| 55 | # Define a configure option for an alternate input module directory |
| 56 | AC_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"]) |
| 62 | inputdir=${moduledir}/input |
| 63 | AC_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 |
| 67 | sdkdir=`$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 |
| 71 | AC_ARG_WITH([sdkdir], [], [sdkdir="$withval"]) |
| 72 | AC_SUBST([sdkdir]) |
| 73 | |
| 74 | DRIVER_NAME=cmt |
| 75 | AC_SUBST([DRIVER_NAME]) |
| 76 | |
| 77 | AC_CONFIG_FILES([Makefile |
| 78 | src/Makefile |
Daniel Kurtz | 69baa17 | 2011-06-04 01:31:22 | [diff] [blame] | 79 | include/Makefile |
Daniel Kurtz | 1368601 | 2011-06-04 01:32:57 | [diff] [blame] | 80 | man/Makefile |
Daniel Kurtz | 9f02b92 | 2011-06-04 19:21:12 | [diff] [blame] | 81 | xorg-cmt.pc]) |
| 82 | AC_OUTPUT |