configure.ac revision a1ed278c
1ee3138f1Smrg#  Copyright 2005 Adam Jackson.
2ee3138f1Smrg#
3ee3138f1Smrg#  Permission is hereby granted, free of charge, to any person obtaining a
4ee3138f1Smrg#  copy of this software and associated documentation files (the "Software"),
5ee3138f1Smrg#  to deal in the Software without restriction, including without limitation
6ee3138f1Smrg#  on the rights to use, copy, modify, merge, publish, distribute, sub
7ee3138f1Smrg#  license, and/or sell copies of the Software, and to permit persons to whom
8ee3138f1Smrg#  the Software is furnished to do so, subject to the following conditions:
9ee3138f1Smrg#
10ee3138f1Smrg#  The above copyright notice and this permission notice (including the next
11ee3138f1Smrg#  paragraph) shall be included in all copies or substantial portions of the
12ee3138f1Smrg#  Software.
13ee3138f1Smrg#
14ee3138f1Smrg#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15ee3138f1Smrg#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16ee3138f1Smrg#  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
17ee3138f1Smrg#  ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18ee3138f1Smrg#  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19ee3138f1Smrg#  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20ee3138f1Smrg#
21ee3138f1Smrg# Process this file with autoconf to produce a configure script
22ee3138f1Smrg
23b425557eSmrg# Initialize Autoconf
24b425557eSmrgAC_PREREQ([2.60])
25ee3138f1SmrgAC_INIT([xf86-input-keyboard],
26a1ed278cSmrg        [1.6.0],
27ee3138f1Smrg        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
28b425557eSmrg        [xf86-input-keyboard])
29ee3138f1SmrgAC_CONFIG_SRCDIR([Makefile.am])
30b425557eSmrgAC_CONFIG_HEADERS([config.h])
31ee3138f1SmrgAC_CONFIG_AUX_DIR(.)
32ee3138f1Smrg
33b425557eSmrg# Initialize Automake
34b425557eSmrgAM_INIT_AUTOMAKE([foreign dist-bzip2])
35ee3138f1SmrgAM_MAINTAINER_MODE
36ee3138f1Smrg
37b425557eSmrg# Initialize libtool
38ee3138f1SmrgAC_DISABLE_STATIC
39ee3138f1SmrgAC_PROG_LIBTOOL
40ee3138f1Smrg
41b425557eSmrg# Initialize X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
42b425557eSmrgm4_ifndef([XORG_MACROS_VERSION],
43b425557eSmrg          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
44b425557eSmrgXORG_MACROS_VERSION(1.8)
45b425557eSmrgXORG_DEFAULT_OPTIONS
46b425557eSmrg
47b425557eSmrg# Obtain compiler/linker options from server and required extensions
48a1ed278cSmrgPKG_CHECK_MODULES(XORG, [xorg-server >= 1.4] xproto inputproto)
49b425557eSmrg
50b425557eSmrg# Define a configure option for an alternate input module directory
51b425557eSmrgAC_ARG_WITH(xorg-module-dir,
52b425557eSmrg            AC_HELP_STRING([--with-xorg-module-dir=DIR],
53b425557eSmrg                           [Default xorg module directory [[default=$libdir/xorg/modules]]]),
54b425557eSmrg            [moduledir="$withval"],
55b425557eSmrg            [moduledir="$libdir/xorg/modules"])
56b425557eSmrginputdir=${moduledir}/input
57b425557eSmrgAC_SUBST(inputdir)
58ee3138f1Smrg
59b425557eSmrg# The keyboard driver code is O/S specific
60ee3138f1Smrgcase $host_os in
61ee3138f1Smrg  linux*)
62ee3138f1Smrg    IS_LINUX="yes"
63ee3138f1Smrg    ;;
64ee3138f1Smrg
65ee3138f1Smrg  freebsd* | kfreebsd-gnu* | netbsd* | openbsd*)
66ee3138f1Smrg    IS_BSD="yes"
67ee3138f1Smrg    ;;
68ee3138f1Smrg
69ee3138f1Smrg  solaris*)
70ee3138f1Smrg    IS_SOLARIS="yes"
71ee3138f1Smrg    ;;
72ee3138f1Smrg
73ee3138f1Smrg  gnu*)
74ee3138f1Smrg    IS_HURD="yes"
75ee3138f1Smrg    ;;
76ee3138f1Smrg
77ee3138f1Smrg  *)
78ee3138f1Smrg    AC_MSG_ERROR([Your operating system is not supported by the kbd driver.
79ee3138f1Smrg                  Contact xorg@lists.freedesktop.org if you are interested in
80ee3138f1Smrg                  porting it.])
81ee3138f1Smrg    ;;
82ee3138f1Smrgesac
83ee3138f1SmrgAM_CONDITIONAL(LINUX, [test "x$IS_LINUX" = xyes])
84ee3138f1SmrgAM_CONDITIONAL(BSD, [test "x$IS_BSD" = xyes])
85ee3138f1SmrgAM_CONDITIONAL(SOLARIS, [test "x$IS_SOLARIS" = xyes])
86ee3138f1SmrgAM_CONDITIONAL(HURD, [test "x$IS_HURD" = xyes])
87ee3138f1Smrg
88b425557eSmrgDRIVER_NAME=kbd
89b425557eSmrgAC_SUBST([DRIVER_NAME])
90ee3138f1Smrg
91b425557eSmrgAC_CONFIG_FILES([Makefile
92b425557eSmrg                 src/Makefile
93b425557eSmrg                 man/Makefile])
94b425557eSmrgAC_OUTPUT
95