configure.ac revision e8ead290
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.60])
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.11],
32        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],[libXcursor])
33AM_INIT_AUTOMAKE([foreign dist-bzip2])
34AC_CONFIG_SRCDIR([Makefile.am])
35AM_MAINTAINER_MODE
36AM_CONFIG_HEADER(config.h)
37
38# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
39m4_ifndef([XORG_MACROS_VERSION],
40          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
41XORG_MACROS_VERSION(1.8)
42XORG_DEFAULT_OPTIONS
43
44# Check for progs
45AC_PROG_CC
46AC_PROG_LIBTOOL
47
48AC_ARG_WITH(icondir,
49        AC_HELP_STRING([--with-icondir=<path>],
50                       [Set default icon directory (default: ${datadir}/icons)]),
51        [ICONDIR="$withval"],
52        [ICONDIR=${datadir}/icons])
53AC_SUBST([ICONDIR])
54
55DEF_CURSORPATH="~/.icons:${datadir}/icons:${datadir}/pixmaps"
56if test "x${ICONDIR}" != "x${datadir}/icons"; then
57	DEF_CURSORPATH="${DEF_CURSORPATH}:${ICONDIR}"
58fi
59AC_ARG_WITH(cursorpath,
60        AC_HELP_STRING([--with-cursorpath=<paths>],
61                       [Set default search path for cursors]),
62        [XCURSORPATH="$withval"],
63        [XCURSORPATH=$DEF_CURSORPATH])
64AC_SUBST([XCURSORPATH])
65
66# Reformat cursor path for man page
67XCURSORPATH_LIST=`echo $XCURSORPATH | sed 's/:/, /g'`
68AC_SUBST([XCURSORPATH_LIST])
69
70# Check for X
71PKG_CHECK_MODULES(XCURSOR, xrender >= 0.8.2 xfixes x11 fixesproto)
72AC_DEFINE(HAVE_XFIXES, 1, [Define to 1 if you have Xfixes])
73
74dnl Allow checking code with lint, sparse, etc.
75XORG_WITH_LINT
76
77AC_OUTPUT([Makefile
78	   src/Makefile
79	   man/Makefile
80           xcursor.pc])
81