configure.ac revision 6b7436ae
11.42Smrg# 21.5Sjdc# Copyright © 2003 Keith Packard 31.5Sjdc# 41.5Sjdc# Permission to use, copy, modify, distribute, and sell this software and its 51.37Suki# documentation for any purpose is hereby granted without fee, provided that 61.37Suki# the above copyright notice appear in all copies and that both that 71.35Suki# copyright notice and this permission notice appear in supporting 81.37Suki# documentation, and that the name of Keith Packard not be used in 91.37Suki# advertising or publicity pertaining to distribution of the software without 101.37Suki# specific, written prior permission. Keith Packard makes no 111.37Suki# representations about the suitability of this software for any purpose. It 121.37Suki# is provided "as is" without express or implied warranty. 131.37Suki# 141.37Suki# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 151.37Suki# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 161.37Suki# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR 171.37Suki# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 181.37Suki# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 191.37Suki# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 201.37Suki# PERFORMANCE OF THIS SOFTWARE. 211.37Suki# 221.37Suki 231.12Splunky# Initialize Autoconf 241.12SplunkyAC_PREREQ([2.60]) 251.37Suki# 261.37Suki# This is the package version number, not the shared library 271.37Suki# version. This version number will be substituted into Xcursor.h 281.41Smrg# 291.41SmrgAC_INIT([libXcursor], [1.2.3], 301.37Suki [https://gitlab.freedesktop.org/xorg/lib/libxcursor/-/issues], 311.37Suki [libXcursor]) 321.37SukiAC_CONFIG_SRCDIR([Makefile.am]) 331.37SukiAC_CONFIG_HEADERS([config.h include/X11/Xcursor/Xcursor.h]) 341.37SukiAC_CONFIG_MACRO_DIRS([m4]) 351.37Suki 361.42Smrg# Set common system defines for POSIX extensions, such as _GNU_SOURCE 371.37Suki# Must be called before any macros that run the compiler (like LT_INIT) 381.37Suki# to avoid autoconf errors. 391.37SukiAC_USE_SYSTEM_EXTENSIONS 401.37Suki 411.37Suki# Initialize Automake 421.37SukiAM_INIT_AUTOMAKE([foreign dist-xz]) 431.37Suki 441.37Suki# Initialize libtool 451.37SukiLT_INIT 461.37Suki 471.37Suki# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS 481.37Sukim4_ifndef([XORG_MACROS_VERSION], 491.37Suki [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) 501.37SukiXORG_MACROS_VERSION(1.8) 511.41SmrgXORG_DEFAULT_OPTIONS 521.37Suki 531.37Suki# Set library version for Xcursor.h from package version set in AC_INIT 541.37Suki# copied from PACKAGE_VERSION_* settings in XORG_VERSION 551.41SmrgAC_DEFINE_UNQUOTED([XCURSOR_LIB_MAJOR], 561.37Suki [`echo $PACKAGE_VERSION | cut -d . -f 1`], 571.37Suki [Major version of libXcursor]) 581.37SukiAC_DEFINE_UNQUOTED([XCURSOR_LIB_MINOR], 591.37Suki [`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`], 601.37Suki [Minor version of libXcursor]) 611.37SukiAC_DEFINE_UNQUOTED([XCURSOR_LIB_REVISION], 621.37Suki [`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`], 631.37Suki [Micro revision of libXcursor]) 641.37Suki 651.39Snia 661.37SukiAC_ARG_WITH(icondir, 671.37Suki AS_HELP_STRING([--with-icondir=<path>], 681.37Suki [Set default icon directory (default: ${datadir}/icons)]), 691.37Suki [ICONDIR="$withval"], 701.38Sriastrad [ICONDIR=${datadir}/icons]) 711.37SukiAC_SUBST([ICONDIR]) 721.42Smrg 731.42SmrgDEF_CURSORPATH="~/.local/share/icons:~/.icons:${datadir}/icons:${datadir}/pixmaps" 741.41Smrgif test "x${ICONDIR}" != "x${datadir}/icons"; then 751.37Suki DEF_CURSORPATH="${DEF_CURSORPATH}:${ICONDIR}" 761.37Sukifi 771.37SukiAC_ARG_WITH(cursorpath, 781.37Suki AS_HELP_STRING([--with-cursorpath=<paths>], 791.37Suki [Set default search path for cursors]), 801.37Suki [XCURSORPATH="$withval"], 811.37Suki [XCURSORPATH=$DEF_CURSORPATH]) 821.41SmrgAC_SUBST([XCURSORPATH]) 831.37Suki 841.37Suki# Obtain compiler/linker options for dependencies 851.37SukiPKG_CHECK_MODULES(XCURSOR, xrender >= 0.8.2 xfixes x11 fixesproto) 861.37SukiAC_DEFINE(HAVE_XFIXES, 1, [Define to 1 if you have Xfixes]) 871.37Suki 881.37Suki# Allow checking code with lint, sparse, etc. 891.37SukiXORG_WITH_LINT 901.37Suki 911.39SniaAC_CONFIG_FILES([Makefile 921.37Suki src/Makefile 931.37Suki man/Makefile 941.37Suki xcursor.pc]) 951.37SukiAC_OUTPUT 961.8Srtr