configure.ac revision 3e72ca8c
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], 263e72ca8cSmrg [1.7.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]) 35ee3138f1Smrg 36b425557eSmrg# Initialize libtool 37ee3138f1SmrgAC_DISABLE_STATIC 38ee3138f1SmrgAC_PROG_LIBTOOL 39ee3138f1Smrg 40b425557eSmrg# Initialize X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS 41b425557eSmrgm4_ifndef([XORG_MACROS_VERSION], 42b425557eSmrg [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) 43b425557eSmrgXORG_MACROS_VERSION(1.8) 44b425557eSmrgXORG_DEFAULT_OPTIONS 45b425557eSmrg 46b425557eSmrg# Obtain compiler/linker options from server and required extensions 47a1ed278cSmrgPKG_CHECK_MODULES(XORG, [xorg-server >= 1.4] xproto inputproto) 48b425557eSmrg 49b425557eSmrg# Define a configure option for an alternate input module directory 50b425557eSmrgAC_ARG_WITH(xorg-module-dir, 51b425557eSmrg AC_HELP_STRING([--with-xorg-module-dir=DIR], 52b425557eSmrg [Default xorg module directory [[default=$libdir/xorg/modules]]]), 53b425557eSmrg [moduledir="$withval"], 54b425557eSmrg [moduledir="$libdir/xorg/modules"]) 55b425557eSmrginputdir=${moduledir}/input 56b425557eSmrgAC_SUBST(inputdir) 57ee3138f1Smrg 58b425557eSmrg# The keyboard driver code is O/S specific 59ee3138f1Smrgcase $host_os in 60ee3138f1Smrg linux*) 61ee3138f1Smrg IS_LINUX="yes" 62ee3138f1Smrg ;; 63ee3138f1Smrg 643e72ca8cSmrg freebsd* | kfreebsd-gnu* | netbsd* | openbsd* | dragonfly*) 65ee3138f1Smrg IS_BSD="yes" 66ee3138f1Smrg ;; 67ee3138f1Smrg 68ee3138f1Smrg solaris*) 69ee3138f1Smrg IS_SOLARIS="yes" 70ee3138f1Smrg ;; 71ee3138f1Smrg 72ee3138f1Smrg gnu*) 73ee3138f1Smrg IS_HURD="yes" 74ee3138f1Smrg ;; 75ee3138f1Smrg 76ee3138f1Smrg *) 77ee3138f1Smrg AC_MSG_ERROR([Your operating system is not supported by the kbd driver. 78ee3138f1Smrg Contact xorg@lists.freedesktop.org if you are interested in 79ee3138f1Smrg porting it.]) 80ee3138f1Smrg ;; 81ee3138f1Smrgesac 82ee3138f1SmrgAM_CONDITIONAL(LINUX, [test "x$IS_LINUX" = xyes]) 83ee3138f1SmrgAM_CONDITIONAL(BSD, [test "x$IS_BSD" = xyes]) 84ee3138f1SmrgAM_CONDITIONAL(SOLARIS, [test "x$IS_SOLARIS" = xyes]) 85ee3138f1SmrgAM_CONDITIONAL(HURD, [test "x$IS_HURD" = xyes]) 86ee3138f1Smrg 87b425557eSmrgDRIVER_NAME=kbd 88b425557eSmrgAC_SUBST([DRIVER_NAME]) 89ee3138f1Smrg 90b425557eSmrgAC_CONFIG_FILES([Makefile 91b425557eSmrg src/Makefile 92b425557eSmrg man/Makefile]) 93b425557eSmrgAC_OUTPUT 94