configure.ac revision b73be646
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
23b73be646Smrg# Initialize Autoconf
24b73be646SmrgAC_PREREQ([2.60])
25659607e0SmrgAC_INIT([xf86-input-mouse],
26b73be646Smrg        [1.6.0],
27659607e0Smrg        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
28b73be646Smrg        [xf86-input-mouse])
29659607e0SmrgAC_CONFIG_SRCDIR([Makefile.am])
30b73be646SmrgAC_CONFIG_HEADERS([config.h])
31659607e0SmrgAC_CONFIG_AUX_DIR(.)
32659607e0Smrg
33b73be646Smrg# Initialize Automake
34b73be646SmrgAM_INIT_AUTOMAKE([foreign dist-bzip2])
35659607e0SmrgAM_MAINTAINER_MODE
36659607e0Smrg
37b73be646Smrg# Initialize libtool
38659607e0SmrgAC_DISABLE_STATIC
39659607e0SmrgAC_PROG_LIBTOOL
40b73be646Smrg
41b73be646Smrg# Initialize X.Org macros
42b73be646Smrgm4_ifndef([XORG_MACROS_VERSION],
43b73be646Smrg          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
44b73be646SmrgXORG_MACROS_VERSION(1.8)
45fc27e79cSmrgXORG_DEFAULT_OPTIONS
46b73be646SmrgXORG_WITH_LINT
47659607e0Smrg
48b73be646Smrg# Obtain compiler/linker options from server and required extensions
49b73be646SmrgPKG_CHECK_MODULES(XORG, [xorg-server >= 1.5.99.901] xproto inputproto)
50659607e0Smrg
51b73be646Smrg# Define a configure option for an alternate input module directory
52659607e0SmrgAC_ARG_WITH(xorg-module-dir,
53b73be646Smrg            AS_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
606aab59a7Smrg# Work out which OS mouse driver we need to build
616aab59a7Smrgcase $host_os in
626aab59a7Smrg  linux*)
636aab59a7Smrg    OS_MOUSE_NAME=lnx
646aab59a7Smrg    ;;
656aab59a7Smrg  freebsd*|kfreebsd*-gnu|dragonfly*|netbsd*|openbsd*)
666aab59a7Smrg    OS_MOUSE_NAME=bsd
676aab59a7Smrg    ;;
686aab59a7Smrg  solaris*)
696aab59a7Smrg    OS_MOUSE_NAME=sun
706aab59a7Smrg    ;;
716aab59a7Smrg  gnu*)
726aab59a7Smrg    OS_MOUSE_NAME=hurd
736aab59a7Smrg    ;;
746aab59a7Smrgesac
756aab59a7SmrgAC_SUBST([OS_MOUSE_NAME])
766aab59a7Smrg
77b73be646SmrgDRIVER_NAME=mouse
78b73be646SmrgAC_SUBST([DRIVER_NAME])
79659607e0Smrg
80b73be646SmrgAC_CONFIG_FILES([Makefile
81b73be646Smrg                 src/Makefile
82b73be646Smrg                 man/Makefile])
83b73be646SmrgAC_OUTPUT
84