Merge branch 'upstream' into tizen
[platform/upstream/libXcursor.git] / configure.ac
1 #
2 #  Copyright © 2003 Keith Packard
3 #
4 #  Permission to use, copy, modify, distribute, and sell this software and its
5 #  documentation for any purpose is hereby granted without fee, provided that
6 #  the above copyright notice appear in all copies and that both that
7 #  copyright notice and this permission notice appear in supporting
8 #  documentation, and that the name of Keith Packard not be used in
9 #  advertising or publicity pertaining to distribution of the software without
10 #  specific, written prior permission.  Keith Packard makes no
11 #  representations about the suitability of this software for any purpose.  It
12 #  is provided "as is" without express or implied warranty.
13 #
14 #  KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 #  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 #  EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 #  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 #  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 #  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20 #  PERFORMANCE OF THIS SOFTWARE.
21 #
22
23 # Initialize Autoconf
24 AC_PREREQ([2.60])
25 #
26 # This is the package version number, not the shared library
27 # version.  This version number will be substituted into Xcursor.h
28 #
29 AC_INIT([libXcursor], [1.1.14],
30         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],[libXcursor])
31 AC_CONFIG_SRCDIR([Makefile.am])
32 AC_CONFIG_HEADERS([config.h include/X11/Xcursor/Xcursor.h])
33
34 # Initialize Automake
35 AM_INIT_AUTOMAKE([foreign dist-bzip2])
36 AM_MAINTAINER_MODE
37
38 # Initialize libtool
39 AC_PROG_LIBTOOL
40
41 # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
42 m4_ifndef([XORG_MACROS_VERSION],
43           [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
44 XORG_MACROS_VERSION(1.8)
45 XORG_DEFAULT_OPTIONS
46
47 # Set library version for Xcursor.h from package version set in AC_INIT
48 # copied from PACKAGE_VERSION_* settings in XORG_VERSION
49 AC_DEFINE_UNQUOTED([XCURSOR_LIB_MAJOR],
50                    [`echo $PACKAGE_VERSION | cut -d . -f 1`],
51                    [Major version of libXcursor])
52 AC_DEFINE_UNQUOTED([XCURSOR_LIB_MINOR],
53                    [`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`],
54                    [Minor version of libXcursor])
55 AC_DEFINE_UNQUOTED([XCURSOR_LIB_REVISION],
56                    [`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`],
57                    [Micro revision of libXcursor])
58
59
60 AC_ARG_WITH(icondir,
61         AS_HELP_STRING([--with-icondir=<path>],
62                        [Set default icon directory (default: ${datadir}/icons)]),
63         [ICONDIR="$withval"],
64         [ICONDIR=${datadir}/icons])
65 AC_SUBST([ICONDIR])
66
67 DEF_CURSORPATH="~/.icons:${datadir}/icons:${datadir}/pixmaps"
68 if test "x${ICONDIR}" != "x${datadir}/icons"; then
69         DEF_CURSORPATH="${DEF_CURSORPATH}:${ICONDIR}"
70 fi
71 AC_ARG_WITH(cursorpath,
72         AS_HELP_STRING([--with-cursorpath=<paths>],
73                        [Set default search path for cursors]),
74         [XCURSORPATH="$withval"],
75         [XCURSORPATH=$DEF_CURSORPATH])
76 AC_SUBST([XCURSORPATH])
77
78 # Obtain compiler/linker options for depedencies
79 PKG_CHECK_MODULES(XCURSOR, xrender >= 0.8.2 xfixes x11 fixesproto)
80 AC_DEFINE(HAVE_XFIXES, 1, [Define to 1 if you have Xfixes])
81
82 # Allow checking code with lint, sparse, etc.
83 XORG_WITH_LINT
84
85 AC_CONFIG_FILES([Makefile
86                 src/Makefile
87                 man/Makefile
88                 xcursor.pc])
89 AC_OUTPUT