configure.ac revision e8ead290
17914d74bSmrgdnl 
27914d74bSmrgdnl  Copyright © 2003 Keith Packard
37914d74bSmrgdnl 
47914d74bSmrgdnl  Permission to use, copy, modify, distribute, and sell this software and its
57914d74bSmrgdnl  documentation for any purpose is hereby granted without fee, provided that
67914d74bSmrgdnl  the above copyright notice appear in all copies and that both that
77914d74bSmrgdnl  copyright notice and this permission notice appear in supporting
87914d74bSmrgdnl  documentation, and that the name of Keith Packard not be used in
97914d74bSmrgdnl  advertising or publicity pertaining to distribution of the software without
107914d74bSmrgdnl  specific, written prior permission.  Keith Packard makes no
117914d74bSmrgdnl  representations about the suitability of this software for any purpose.  It
127914d74bSmrgdnl  is provided "as is" without express or implied warranty.
137914d74bSmrgdnl 
147914d74bSmrgdnl  KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
157914d74bSmrgdnl  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
167914d74bSmrgdnl  EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
177914d74bSmrgdnl  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
187914d74bSmrgdnl  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
197914d74bSmrgdnl  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
207914d74bSmrgdnl  PERFORMANCE OF THIS SOFTWARE.
217914d74bSmrgdnl
227914d74bSmrgdnl Process this file with autoconf to create configure.
237914d74bSmrg
24e8ead290SmrgAC_PREREQ([2.60])
257914d74bSmrgdnl
267914d74bSmrgdnl This is the package version number, not the shared library
277914d74bSmrgdnl version.  This same version number must appear in Xcursor.h
287914d74bSmrgdnl Yes, it is a pain to synchronize version numbers.  Unfortunately, it's
297914d74bSmrgdnl not possible to extract the version number here from Xcursor.h
307914d74bSmrgdnl
31e8ead290SmrgAC_INIT([libXcursor], [1.1.11],
32e8ead290Smrg        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],[libXcursor])
33e8ead290SmrgAM_INIT_AUTOMAKE([foreign dist-bzip2])
347914d74bSmrgAC_CONFIG_SRCDIR([Makefile.am])
357914d74bSmrgAM_MAINTAINER_MODE
367914d74bSmrgAM_CONFIG_HEADER(config.h)
377914d74bSmrg
38e8ead290Smrg# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
39e8ead290Smrgm4_ifndef([XORG_MACROS_VERSION],
40e8ead290Smrg          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
41e8ead290SmrgXORG_MACROS_VERSION(1.8)
42e8ead290SmrgXORG_DEFAULT_OPTIONS
437914d74bSmrg
447914d74bSmrg# Check for progs
457914d74bSmrgAC_PROG_CC
467914d74bSmrgAC_PROG_LIBTOOL
477914d74bSmrg
487914d74bSmrgAC_ARG_WITH(icondir,
497914d74bSmrg        AC_HELP_STRING([--with-icondir=<path>],
507914d74bSmrg                       [Set default icon directory (default: ${datadir}/icons)]),
517914d74bSmrg        [ICONDIR="$withval"],
527914d74bSmrg        [ICONDIR=${datadir}/icons])
537914d74bSmrgAC_SUBST([ICONDIR])
547914d74bSmrg
557914d74bSmrgDEF_CURSORPATH="~/.icons:${datadir}/icons:${datadir}/pixmaps"
567914d74bSmrgif test "x${ICONDIR}" != "x${datadir}/icons"; then
577914d74bSmrg	DEF_CURSORPATH="${DEF_CURSORPATH}:${ICONDIR}"
587914d74bSmrgfi
597914d74bSmrgAC_ARG_WITH(cursorpath,
607914d74bSmrg        AC_HELP_STRING([--with-cursorpath=<paths>],
617914d74bSmrg                       [Set default search path for cursors]),
627914d74bSmrg        [XCURSORPATH="$withval"],
637914d74bSmrg        [XCURSORPATH=$DEF_CURSORPATH])
647914d74bSmrgAC_SUBST([XCURSORPATH])
657914d74bSmrg
667914d74bSmrg# Reformat cursor path for man page
677914d74bSmrgXCURSORPATH_LIST=`echo $XCURSORPATH | sed 's/:/, /g'`
687914d74bSmrgAC_SUBST([XCURSORPATH_LIST])
697914d74bSmrg
707914d74bSmrg# Check for X
717914d74bSmrgPKG_CHECK_MODULES(XCURSOR, xrender >= 0.8.2 xfixes x11 fixesproto)
727914d74bSmrgAC_DEFINE(HAVE_XFIXES, 1, [Define to 1 if you have Xfixes])
737914d74bSmrg
747914d74bSmrgdnl Allow checking code with lint, sparse, etc.
757914d74bSmrgXORG_WITH_LINT
767914d74bSmrg
777914d74bSmrgAC_OUTPUT([Makefile
787914d74bSmrg	   src/Makefile
797914d74bSmrg	   man/Makefile
807914d74bSmrg           xcursor.pc])
81