configure.ac revision e169010a
1dnl 2dnl Copyright © 2003 Keith Packard 3dnl 4dnl Permission to use, copy, modify, distribute, and sell this software and its 5dnl documentation for any purpose is hereby granted without fee, provided that 6dnl the above copyright notice appear in all copies and that both that 7dnl copyright notice and this permission notice appear in supporting 8dnl documentation, and that the name of Keith Packard not be used in 9dnl advertising or publicity pertaining to distribution of the software without 10dnl specific, written prior permission. Keith Packard makes no 11dnl representations about the suitability of this software for any purpose. It 12dnl is provided "as is" without express or implied warranty. 13dnl 14dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 16dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 18dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 20dnl PERFORMANCE OF THIS SOFTWARE. 21dnl 22dnl Process this file with autoconf to create configure. 23 24AC_PREREQ([2.57]) 25dnl 26dnl This is the package version number, not the shared library 27dnl version. This same version number must appear in Xcursor.h 28dnl Yes, it is a pain to synchronize version numbers. Unfortunately, it's 29dnl not possible to extract the version number here from Xcursor.h 30dnl 31AC_INIT([libXcursor],1.1.10,[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],[libXcursor]) 32AM_INIT_AUTOMAKE([dist-bzip2]) 33AC_CONFIG_SRCDIR([Makefile.am]) 34AM_MAINTAINER_MODE 35AM_CONFIG_HEADER(config.h) 36 37# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG, XORG_WITH_LINT 38m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) 39XORG_MACROS_VERSION(1.2) 40 41# Check for progs 42AC_PROG_CC 43AC_PROG_LIBTOOL 44XORG_CWARNFLAGS 45 46AC_ARG_WITH(icondir, 47 AC_HELP_STRING([--with-icondir=<path>], 48 [Set default icon directory (default: ${datadir}/icons)]), 49 [ICONDIR="$withval"], 50 [ICONDIR=${datadir}/icons]) 51AC_SUBST([ICONDIR]) 52 53DEF_CURSORPATH="~/.icons:${datadir}/icons:${datadir}/pixmaps" 54if test "x${ICONDIR}" != "x${datadir}/icons"; then 55 DEF_CURSORPATH="${DEF_CURSORPATH}:${ICONDIR}" 56fi 57AC_ARG_WITH(cursorpath, 58 AC_HELP_STRING([--with-cursorpath=<paths>], 59 [Set default search path for cursors]), 60 [XCURSORPATH="$withval"], 61 [XCURSORPATH=$DEF_CURSORPATH]) 62AC_SUBST([XCURSORPATH]) 63 64# Reformat cursor path for man page 65XCURSORPATH_LIST=`echo $XCURSORPATH | sed 's/:/, /g'` 66AC_SUBST([XCURSORPATH_LIST]) 67 68# Check for X 69PKG_CHECK_MODULES(XCURSOR, xrender >= 0.8.2 xfixes x11 fixesproto) 70AC_DEFINE(HAVE_XFIXES, 1, [Define to 1 if you have Xfixes]) 71XCURSOR_CFLAGS="$CWARNFLAGS $XCURSOR_CFLAGS" 72AC_SUBST(XCURSOR_CFLAGS) 73AC_SUBST(XCURSOR_LIBS) 74 75XORG_MANPAGE_SECTIONS 76XORG_RELEASE_VERSION 77XORG_CHANGELOG 78 79dnl Allow checking code with lint, sparse, etc. 80XORG_WITH_LINT 81 82AC_OUTPUT([Makefile 83 src/Makefile 84 man/Makefile 85 xcursor.pc]) 86