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