configure.ac revision 6aab59a7
1659607e0Smrg#  Copyright 2005 Adam Jackson.
2659607e0Smrg#
3659607e0Smrg#  Permission is hereby granted, free of charge, to any person obtaining a
4659607e0Smrg#  copy of this software and associated documentation files (the "Software"),
5659607e0Smrg#  to deal in the Software without restriction, including without limitation
6659607e0Smrg#  on the rights to use, copy, modify, merge, publish, distribute, sub
7659607e0Smrg#  license, and/or sell copies of the Software, and to permit persons to whom
8659607e0Smrg#  the Software is furnished to do so, subject to the following conditions:
9659607e0Smrg#
10659607e0Smrg#  The above copyright notice and this permission notice (including the next
11659607e0Smrg#  paragraph) shall be included in all copies or substantial portions of the
12659607e0Smrg#  Software.
13659607e0Smrg#
14659607e0Smrg#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15659607e0Smrg#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16659607e0Smrg#  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
17659607e0Smrg#  ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18659607e0Smrg#  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19659607e0Smrg#  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20659607e0Smrg#
21659607e0Smrg# Process this file with autoconf to produce a configure script
22659607e0Smrg
23659607e0SmrgAC_PREREQ(2.57)
24659607e0SmrgAC_INIT([xf86-input-mouse],
256aab59a7Smrg        1.4.0,
26659607e0Smrg        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
27659607e0Smrg        xf86-input-mouse)
28659607e0Smrg
296aab59a7Smrg# Require xorg-macros version >= 1.2.0 for XORG_CWARNFLAGS & XORG_CHANGELOG
306aab59a7Smrgm4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
316aab59a7SmrgXORG_MACROS_VERSION(1.2)
326aab59a7Smrg
33659607e0SmrgAC_CONFIG_SRCDIR([Makefile.am])
34659607e0SmrgAC_CONFIG_AUX_DIR(.)
35659607e0SmrgAM_INIT_AUTOMAKE([dist-bzip2])
36659607e0Smrg
37659607e0SmrgAM_MAINTAINER_MODE
38659607e0Smrg
39659607e0SmrgDRIVER_NAME=mouse
40659607e0SmrgAC_SUBST([DRIVER_NAME])
41659607e0Smrg
42659607e0SmrgAM_CONFIG_HEADER([config.h])
43659607e0Smrg
44659607e0Smrg# Checks for programs.
45659607e0SmrgAC_DISABLE_STATIC
46659607e0SmrgAC_PROG_LIBTOOL
47659607e0SmrgAC_PROG_CC
486aab59a7SmrgXORG_CWARNFLAGS
49659607e0Smrg
50659607e0SmrgAH_TOP([#include "xorg-server.h"])
51659607e0Smrg
52659607e0SmrgAC_ARG_WITH(xorg-module-dir,
53659607e0Smrg            AC_HELP_STRING([--with-xorg-module-dir=DIR],
54659607e0Smrg                           [Default xorg module directory [[default=$libdir/xorg/modules]]]),
55659607e0Smrg            [moduledir="$withval"],
56659607e0Smrg            [moduledir="$libdir/xorg/modules"])
57659607e0Smrginputdir=${moduledir}/input
58659607e0SmrgAC_SUBST(inputdir)
59659607e0Smrg
60659607e0Smrg# Checks for extensions
61659607e0SmrgXORG_DRIVER_CHECK_EXT(RANDR, randrproto)
62659607e0SmrgXORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
63659607e0Smrg
64659607e0Smrg# Checks for pkg-config packages
65659607e0SmrgPKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto $REQUIRED_MODULES)
66659607e0Smrgsdkdir=$(pkg-config --variable=sdkdir xorg-server)
67659607e0Smrg
68659607e0Smrg# Checks for libraries.
69659607e0Smrg
70659607e0Smrg# Checks for header files.
71659607e0SmrgAC_HEADER_STDC
72659607e0Smrg
736aab59a7Smrg# Work out which OS mouse driver we need to build
746aab59a7Smrgcase $host_os in
756aab59a7Smrg  linux*)
766aab59a7Smrg    OS_MOUSE_NAME=lnx
776aab59a7Smrg    ;;
786aab59a7Smrg  freebsd*|kfreebsd*-gnu|dragonfly*|netbsd*|openbsd*)
796aab59a7Smrg    OS_MOUSE_NAME=bsd
806aab59a7Smrg    ;;
816aab59a7Smrg  solaris*)
826aab59a7Smrg    OS_MOUSE_NAME=sun
836aab59a7Smrg    ;;
846aab59a7Smrg  gnu*)
856aab59a7Smrg    OS_MOUSE_NAME=hurd
866aab59a7Smrg    ;;
876aab59a7Smrgesac
886aab59a7SmrgAC_SUBST([OS_MOUSE_NAME])
896aab59a7Smrg
906aab59a7Smrgdnl Allow checking code with lint, sparse, etc.
916aab59a7SmrgXORG_WITH_LINT
926aab59a7Smrg
93659607e0SmrgXORG_MANPAGE_SECTIONS
94659607e0SmrgXORG_RELEASE_VERSION
956aab59a7SmrgXORG_CHANGELOG
96659607e0Smrg
97659607e0SmrgXORG_CHECK_LINUXDOC
98659607e0Smrg
99659607e0SmrgAC_OUTPUT([Makefile src/Makefile man/Makefile])
100