configure.ac revision c63293b5
1c63293b5Smrg#
2c63293b5Smrg#  Copyright © 2003 Keith Packard
3c63293b5Smrg#
4c63293b5Smrg#  Permission to use, copy, modify, distribute, and sell this software and its
5c63293b5Smrg#  documentation for any purpose is hereby granted without fee, provided that
6c63293b5Smrg#  the above copyright notice appear in all copies and that both that
7c63293b5Smrg#  copyright notice and this permission notice appear in supporting
8c63293b5Smrg#  documentation, and that the name of Keith Packard not be used in
9c63293b5Smrg#  advertising or publicity pertaining to distribution of the software without
10c63293b5Smrg#  specific, written prior permission.  Keith Packard makes no
11c63293b5Smrg#  representations about the suitability of this software for any purpose.  It
12c63293b5Smrg#  is provided "as is" without express or implied warranty.
13c63293b5Smrg#
14c63293b5Smrg#  KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15c63293b5Smrg#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16c63293b5Smrg#  EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17c63293b5Smrg#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18c63293b5Smrg#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19c63293b5Smrg#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20c63293b5Smrg#  PERFORMANCE OF THIS SOFTWARE.
21c63293b5Smrg#
227914d74bSmrg
23c63293b5Smrg# Initialize Autoconf
24e8ead290SmrgAC_PREREQ([2.60])
25c63293b5Smrg#
26c63293b5Smrg# This is the package version number, not the shared library
27c63293b5Smrg# version.  This same version number must appear in Xcursor.h
28c63293b5Smrg# Yes, it is a pain to synchronize version numbers.  Unfortunately, it's
29c63293b5Smrg# not possible to extract the version number here from Xcursor.h
30c63293b5Smrg#
31c63293b5SmrgAC_INIT([libXcursor], [1.1.12],
32e8ead290Smrg        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],[libXcursor])
337914d74bSmrgAC_CONFIG_SRCDIR([Makefile.am])
34c63293b5SmrgAC_CONFIG_HEADERS([config.h])
35c63293b5Smrg
36c63293b5Smrg# Initialize Automake
37c63293b5SmrgAM_INIT_AUTOMAKE([foreign dist-bzip2])
387914d74bSmrgAM_MAINTAINER_MODE
39c63293b5Smrg
40c63293b5Smrg# Initialize libtool
41c63293b5SmrgAC_PROG_LIBTOOL
427914d74bSmrg
43e8ead290Smrg# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
44e8ead290Smrgm4_ifndef([XORG_MACROS_VERSION],
45e8ead290Smrg          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
46e8ead290SmrgXORG_MACROS_VERSION(1.8)
47e8ead290SmrgXORG_DEFAULT_OPTIONS
487914d74bSmrg
497914d74bSmrgAC_ARG_WITH(icondir,
50c63293b5Smrg        AS_HELP_STRING([--with-icondir=<path>],
517914d74bSmrg                       [Set default icon directory (default: ${datadir}/icons)]),
527914d74bSmrg        [ICONDIR="$withval"],
537914d74bSmrg        [ICONDIR=${datadir}/icons])
547914d74bSmrgAC_SUBST([ICONDIR])
557914d74bSmrg
567914d74bSmrgDEF_CURSORPATH="~/.icons:${datadir}/icons:${datadir}/pixmaps"
577914d74bSmrgif test "x${ICONDIR}" != "x${datadir}/icons"; then
587914d74bSmrg	DEF_CURSORPATH="${DEF_CURSORPATH}:${ICONDIR}"
597914d74bSmrgfi
607914d74bSmrgAC_ARG_WITH(cursorpath,
61c63293b5Smrg        AS_HELP_STRING([--with-cursorpath=<paths>],
627914d74bSmrg                       [Set default search path for cursors]),
637914d74bSmrg        [XCURSORPATH="$withval"],
647914d74bSmrg        [XCURSORPATH=$DEF_CURSORPATH])
657914d74bSmrgAC_SUBST([XCURSORPATH])
667914d74bSmrg
67c63293b5Smrg# Obtain compiler/linker options for depedencies
687914d74bSmrgPKG_CHECK_MODULES(XCURSOR, xrender >= 0.8.2 xfixes x11 fixesproto)
697914d74bSmrgAC_DEFINE(HAVE_XFIXES, 1, [Define to 1 if you have Xfixes])
707914d74bSmrg
71c63293b5Smrg# Allow checking code with lint, sparse, etc.
727914d74bSmrgXORG_WITH_LINT
737914d74bSmrg
74c63293b5SmrgAC_CONFIG_FILES([Makefile
75c63293b5Smrg		src/Makefile
76c63293b5Smrg		man/Makefile
77c63293b5Smrg		xcursor.pc])
78c63293b5SmrgAC_OUTPUT
79