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 27e6d5e4e0Smrg# version. This version number will be substituted into Xcursor.h 28c63293b5Smrg# 296b7436aeSmrgAC_INIT([libXcursor], [1.2.3], 300ea508b1Smrg [https://gitlab.freedesktop.org/xorg/lib/libxcursor/-/issues], 310ea508b1Smrg [libXcursor]) 327914d74bSmrgAC_CONFIG_SRCDIR([Makefile.am]) 33e6d5e4e0SmrgAC_CONFIG_HEADERS([config.h include/X11/Xcursor/Xcursor.h]) 340ea508b1SmrgAC_CONFIG_MACRO_DIRS([m4]) 350ea508b1Smrg 369d0ccd10Smrg# Set common system defines for POSIX extensions, such as _GNU_SOURCE 370ea508b1Smrg# Must be called before any macros that run the compiler (like LT_INIT) 389d0ccd10Smrg# to avoid autoconf errors. 399d0ccd10SmrgAC_USE_SYSTEM_EXTENSIONS 40c63293b5Smrg 41c63293b5Smrg# Initialize Automake 424d939ec7SmrgAM_INIT_AUTOMAKE([foreign dist-xz]) 43c63293b5Smrg 44c63293b5Smrg# Initialize libtool 450ea508b1SmrgLT_INIT 467914d74bSmrg 47e8ead290Smrg# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS 48e8ead290Smrgm4_ifndef([XORG_MACROS_VERSION], 49e8ead290Smrg [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) 50e8ead290SmrgXORG_MACROS_VERSION(1.8) 51e8ead290SmrgXORG_DEFAULT_OPTIONS 527914d74bSmrg 53e6d5e4e0Smrg# Set library version for Xcursor.h from package version set in AC_INIT 54e6d5e4e0Smrg# copied from PACKAGE_VERSION_* settings in XORG_VERSION 55e6d5e4e0SmrgAC_DEFINE_UNQUOTED([XCURSOR_LIB_MAJOR], 56e6d5e4e0Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 57e6d5e4e0Smrg [Major version of libXcursor]) 58e6d5e4e0SmrgAC_DEFINE_UNQUOTED([XCURSOR_LIB_MINOR], 59e6d5e4e0Smrg [`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`], 60e6d5e4e0Smrg [Minor version of libXcursor]) 61e6d5e4e0SmrgAC_DEFINE_UNQUOTED([XCURSOR_LIB_REVISION], 62e6d5e4e0Smrg [`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`], 63e6d5e4e0Smrg [Micro revision of libXcursor]) 64e6d5e4e0Smrg 65e6d5e4e0Smrg 667914d74bSmrgAC_ARG_WITH(icondir, 67c63293b5Smrg AS_HELP_STRING([--with-icondir=<path>], 687914d74bSmrg [Set default icon directory (default: ${datadir}/icons)]), 697914d74bSmrg [ICONDIR="$withval"], 707914d74bSmrg [ICONDIR=${datadir}/icons]) 717914d74bSmrgAC_SUBST([ICONDIR]) 727914d74bSmrg 73cdce750aSmrgDEF_CURSORPATH="~/.local/share/icons:~/.icons:${datadir}/icons:${datadir}/pixmaps" 747914d74bSmrgif test "x${ICONDIR}" != "x${datadir}/icons"; then 757914d74bSmrg DEF_CURSORPATH="${DEF_CURSORPATH}:${ICONDIR}" 767914d74bSmrgfi 777914d74bSmrgAC_ARG_WITH(cursorpath, 78c63293b5Smrg AS_HELP_STRING([--with-cursorpath=<paths>], 797914d74bSmrg [Set default search path for cursors]), 807914d74bSmrg [XCURSORPATH="$withval"], 817914d74bSmrg [XCURSORPATH=$DEF_CURSORPATH]) 827914d74bSmrgAC_SUBST([XCURSORPATH]) 837914d74bSmrg 844d939ec7Smrg# Obtain compiler/linker options for dependencies 857914d74bSmrgPKG_CHECK_MODULES(XCURSOR, xrender >= 0.8.2 xfixes x11 fixesproto) 867914d74bSmrgAC_DEFINE(HAVE_XFIXES, 1, [Define to 1 if you have Xfixes]) 877914d74bSmrg 88c63293b5Smrg# Allow checking code with lint, sparse, etc. 897914d74bSmrgXORG_WITH_LINT 907914d74bSmrg 91c63293b5SmrgAC_CONFIG_FILES([Makefile 92c63293b5Smrg src/Makefile 93c63293b5Smrg man/Makefile 94c63293b5Smrg xcursor.pc]) 95c63293b5SmrgAC_OUTPUT 96