configure.ac revision 899129b3
1899129b3Smrg# 2899129b3Smrg# Copyright © 2003 Keith Packard, Noah Levitt 3899129b3Smrg# 4899129b3Smrg# Permission to use, copy, modify, distribute, and sell this software and its 5899129b3Smrg# documentation for any purpose is hereby granted without fee, provided that 6899129b3Smrg# the above copyright notice appear in all copies and that both that 7899129b3Smrg# copyright notice and this permission notice appear in supporting 8899129b3Smrg# documentation, and that the name of Keith Packard not be used in 9899129b3Smrg# advertising or publicity pertaining to distribution of the software without 10899129b3Smrg# specific, written prior permission. Keith Packard makes no 11899129b3Smrg# representations about the suitability of this software for any purpose. It 12899129b3Smrg# is provided "as is" without express or implied warranty. 13899129b3Smrg# 14899129b3Smrg# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15899129b3Smrg# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 16899129b3Smrg# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17899129b3Smrg# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 18899129b3Smrg# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19899129b3Smrg# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 20899129b3Smrg# PERFORMANCE OF THIS SOFTWARE. 21899129b3Smrg# 22bd1da9d7Smrg 23899129b3Smrg# Initialize Autoconf 2447e89262SmrgAC_PREREQ([2.60]) 25899129b3Smrg# 26899129b3Smrg# Version should match the current XRes version. XResQueryVersion 27899129b3Smrg# returns the version from XResproto.h, NOT the version we set here. But we 28899129b3Smrg# try to keep these the same. Note that the library has an extra 29899129b3Smrg# digit in the version number to track changes which don't affect the 30899129b3Smrg# protocol, so XRes version l.n.m corresponds to protocol version l.n 31899129b3Smrg# 32899129b3SmrgAC_INIT([libXres], [1.0.7], 3347e89262Smrg [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXres]) 34899129b3SmrgAC_CONFIG_SRCDIR([Makefile.am]) 35899129b3SmrgAC_CONFIG_HEADERS([config.h]) 36899129b3Smrg 37899129b3Smrg# Initialize Automake 3847e89262SmrgAM_INIT_AUTOMAKE([foreign dist-bzip2]) 3947e89262SmrgAM_MAINTAINER_MODE 405bcb6992Smrg 41899129b3Smrg# Initialize libtool 42899129b3SmrgAC_PROG_LIBTOOL 43899129b3Smrg 4447e89262Smrg# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS 455bcb6992Smrgm4_ifndef([XORG_MACROS_VERSION], 4647e89262Smrg [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) 4747e89262SmrgXORG_MACROS_VERSION(1.8) 485bcb6992SmrgXORG_DEFAULT_OPTIONS 49899129b3SmrgXORG_CHECK_MALLOC_ZERO 50bd1da9d7Smrg 51bd1da9d7Smrg# Check xres configuration, strip extra digits from package version to 52bd1da9d7Smrg# find the required protocol version 53bd1da9d7SmrgRES_VERSION=[`echo $VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`] 54bd1da9d7Smrg 55899129b3Smrg# Obtain compiler/linker options for depedencies 56899129b3SmrgPKG_CHECK_MODULES(XRES, x11 xext xextproto [resourceproto >= $RES_VERSION]) 57bd1da9d7Smrg 58899129b3Smrg# Check for _XEatDataWords function that may be patched into older Xlib release 59899129b3SmrgSAVE_LIBS="$LIBS" 60899129b3SmrgLIBS="$XRES_LIBS" 61899129b3SmrgAC_CHECK_FUNCS([_XEatDataWords]) 62899129b3SmrgLIBS="$SAVE_LIBS" 63bd1da9d7Smrg 64899129b3SmrgAC_CONFIG_FILES([Makefile 65899129b3Smrg src/Makefile 66899129b3Smrg man/Makefile 67899129b3Smrg xres.pc]) 68899129b3SmrgAC_OUTPUT 69