configure.ac revision a73597f9
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], 26a73597f9Smrg [1.9.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]) 35659607e0Smrg 36b73be646Smrg# Initialize libtool 37659607e0SmrgAC_DISABLE_STATIC 38659607e0SmrgAC_PROG_LIBTOOL 39b73be646Smrg 40b73be646Smrg# Initialize X.Org macros 41b73be646Smrgm4_ifndef([XORG_MACROS_VERSION], 42b73be646Smrg [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) 43b73be646SmrgXORG_MACROS_VERSION(1.8) 44fc27e79cSmrgXORG_DEFAULT_OPTIONS 45b73be646SmrgXORG_WITH_LINT 46659607e0Smrg 47b73be646Smrg# Obtain compiler/linker options from server and required extensions 48a73597f9SmrgPKG_CHECK_MODULES(XORG, [xorg-server >= 1.7] xproto inputproto) 49659607e0Smrg 50b73be646Smrg# Define a configure option for an alternate input module directory 51659607e0SmrgAC_ARG_WITH(xorg-module-dir, 52b73be646Smrg AS_HELP_STRING([--with-xorg-module-dir=DIR], 53659607e0Smrg [Default xorg module directory [[default=$libdir/xorg/modules]]]), 54659607e0Smrg [moduledir="$withval"], 55659607e0Smrg [moduledir="$libdir/xorg/modules"]) 56659607e0Smrginputdir=${moduledir}/input 57659607e0SmrgAC_SUBST(inputdir) 58659607e0Smrg 59a73597f9Smrg# X Server SDK location is required to install xf86-mouse-properties.h 60a73597f9Smrg# This location is also relayed in the xorg-mouse.pc file 61a73597f9Smrgsdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` 62a73597f9Smrg 63a73597f9Smrg# Workaround overriding sdkdir to be able to create a tarball when user has no 64a73597f9Smrg# write permission in sdkdir. See DISTCHECK_CONFIGURE_FLAGS in Makefile.am 65a73597f9SmrgAC_ARG_WITH([sdkdir], [], [sdkdir="$withval"]) 66a73597f9SmrgAC_SUBST([sdkdir]) 67a73597f9Smrg 68a73597f9Smrg 696aab59a7Smrg# Work out which OS mouse driver we need to build 706aab59a7Smrgcase $host_os in 716aab59a7Smrg linux*) 726aab59a7Smrg OS_MOUSE_NAME=lnx 736aab59a7Smrg ;; 746aab59a7Smrg freebsd*|kfreebsd*-gnu|dragonfly*|netbsd*|openbsd*) 756aab59a7Smrg OS_MOUSE_NAME=bsd 766aab59a7Smrg ;; 776aab59a7Smrg solaris*) 786aab59a7Smrg OS_MOUSE_NAME=sun 796aab59a7Smrg ;; 806aab59a7Smrg gnu*) 816aab59a7Smrg OS_MOUSE_NAME=hurd 826aab59a7Smrg ;; 836aab59a7Smrgesac 846aab59a7SmrgAC_SUBST([OS_MOUSE_NAME]) 856aab59a7Smrg 86b73be646SmrgDRIVER_NAME=mouse 87b73be646SmrgAC_SUBST([DRIVER_NAME]) 88659607e0Smrg 89b73be646SmrgAC_CONFIG_FILES([Makefile 90a73597f9Smrg xorg-mouse.pc 91a73597f9Smrg include/Makefile 92b73be646Smrg src/Makefile 93b73be646Smrg man/Makefile]) 94b73be646SmrgAC_OUTPUT 95