Blame configure.ac

Packit 439757
#
Packit 439757
#  Copyright © 2003 Keith Packard
Packit 439757
#
Packit 439757
#  Permission to use, copy, modify, distribute, and sell this software and its
Packit 439757
#  documentation for any purpose is hereby granted without fee, provided that
Packit 439757
#  the above copyright notice appear in all copies and that both that
Packit 439757
#  copyright notice and this permission notice appear in supporting
Packit 439757
#  documentation, and that the name of Keith Packard not be used in
Packit 439757
#  advertising or publicity pertaining to distribution of the software without
Packit 439757
#  specific, written prior permission.  Keith Packard makes no
Packit 439757
#  representations about the suitability of this software for any purpose.  It
Packit 439757
#  is provided "as is" without express or implied warranty.
Packit 439757
#
Packit 439757
#  KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
Packit 439757
#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
Packit 439757
#  EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
Packit 439757
#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
Packit 439757
#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
Packit 439757
#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
Packit 439757
#  PERFORMANCE OF THIS SOFTWARE.
Packit 439757
#
Packit 439757
Packit 439757
# Initialize Autoconf
Packit 439757
AC_PREREQ([2.60])
Packit 439757
#
Packit 439757
# This is the package version number, not the shared library
Packit 439757
# version.  This version number will be substituted into Xcursor.h
Packit 439757
#
Packit 439757
AC_INIT([libXcursor], [1.1.15],
Packit 439757
        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],[libXcursor])
Packit 439757
AC_CONFIG_SRCDIR([Makefile.am])
Packit 439757
AC_CONFIG_HEADERS([config.h include/X11/Xcursor/Xcursor.h])
Packit 439757
# Set common system defines for POSIX extensions, such as _GNU_SOURCE
Packit 439757
# Must be called before any macros that run the compiler (like AC_PROG_LIBTOOL)
Packit 439757
# to avoid autoconf errors.
Packit 439757
AC_USE_SYSTEM_EXTENSIONS
Packit 439757
Packit 439757
# Initialize Automake
Packit 439757
AM_INIT_AUTOMAKE([foreign dist-bzip2])
Packit 439757
Packit 439757
# Initialize libtool
Packit 439757
AC_PROG_LIBTOOL
Packit 439757
Packit 439757
# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
Packit 439757
m4_ifndef([XORG_MACROS_VERSION],
Packit 439757
          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
Packit 439757
XORG_MACROS_VERSION(1.8)
Packit 439757
XORG_DEFAULT_OPTIONS
Packit 439757
Packit 439757
# Set library version for Xcursor.h from package version set in AC_INIT
Packit 439757
# copied from PACKAGE_VERSION_* settings in XORG_VERSION
Packit 439757
AC_DEFINE_UNQUOTED([XCURSOR_LIB_MAJOR],
Packit 439757
                   [`echo $PACKAGE_VERSION | cut -d . -f 1`],
Packit 439757
                   [Major version of libXcursor])
Packit 439757
AC_DEFINE_UNQUOTED([XCURSOR_LIB_MINOR],
Packit 439757
                   [`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`],
Packit 439757
                   [Minor version of libXcursor])
Packit 439757
AC_DEFINE_UNQUOTED([XCURSOR_LIB_REVISION],
Packit 439757
                   [`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`],
Packit 439757
                   [Micro revision of libXcursor])
Packit 439757
Packit 439757
Packit 439757
AC_ARG_WITH(icondir,
Packit 439757
        AS_HELP_STRING([--with-icondir=<path>],
Packit 439757
                       [Set default icon directory (default: ${datadir}/icons)]),
Packit 439757
        [ICONDIR="$withval"],
Packit 439757
        [ICONDIR=${datadir}/icons])
Packit 439757
AC_SUBST([ICONDIR])
Packit 439757
Packit 439757
DEF_CURSORPATH="~/.icons:${datadir}/icons:${datadir}/pixmaps"
Packit 439757
if test "x${ICONDIR}" != "x${datadir}/icons"; then
Packit 439757
	DEF_CURSORPATH="${DEF_CURSORPATH}:${ICONDIR}"
Packit 439757
fi
Packit 439757
AC_ARG_WITH(cursorpath,
Packit 439757
        AS_HELP_STRING([--with-cursorpath=<paths>],
Packit 439757
                       [Set default search path for cursors]),
Packit 439757
        [XCURSORPATH="$withval"],
Packit 439757
        [XCURSORPATH=$DEF_CURSORPATH])
Packit 439757
AC_SUBST([XCURSORPATH])
Packit 439757
Packit 439757
# Obtain compiler/linker options for depedencies
Packit 439757
PKG_CHECK_MODULES(XCURSOR, xrender >= 0.8.2 xfixes x11 fixesproto)
Packit 439757
AC_DEFINE(HAVE_XFIXES, 1, [Define to 1 if you have Xfixes])
Packit 439757
Packit 439757
# Allow checking code with lint, sparse, etc.
Packit 439757
XORG_WITH_LINT
Packit 439757
Packit 439757
AC_CONFIG_FILES([Makefile
Packit 439757
		src/Makefile
Packit 439757
		man/Makefile
Packit 439757
		xcursor.pc])
Packit 439757
AC_OUTPUT