configure.ac revision 8bd17e5f
1bd23fbfaSmrg# 2bd23fbfaSmrg# Copyright © 2003 Keith Packard, Noah Levitt 3bd23fbfaSmrg# 4bd23fbfaSmrg# Permission to use, copy, modify, distribute, and sell this software and its 5bd23fbfaSmrg# documentation for any purpose is hereby granted without fee, provided that 6bd23fbfaSmrg# the above copyright notice appear in all copies and that both that 7bd23fbfaSmrg# copyright notice and this permission notice appear in supporting 8bd23fbfaSmrg# documentation, and that the name of Keith Packard not be used in 9bd23fbfaSmrg# advertising or publicity pertaining to distribution of the software without 10bd23fbfaSmrg# specific, written prior permission. Keith Packard makes no 11bd23fbfaSmrg# representations about the suitability of this software for any purpose. It 12bd23fbfaSmrg# is provided "as is" without express or implied warranty. 13bd23fbfaSmrg# 14bd23fbfaSmrg# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15bd23fbfaSmrg# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 16bd23fbfaSmrg# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17bd23fbfaSmrg# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 18bd23fbfaSmrg# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19bd23fbfaSmrg# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 20bd23fbfaSmrg# PERFORMANCE OF THIS SOFTWARE. 21bd23fbfaSmrg# 22b042e37fSmrg 23bd23fbfaSmrg# Initialize Autoconf 24706b6b52SmrgAC_PREREQ([2.60]) 25bd23fbfaSmrg# 26bd23fbfaSmrg# Version should match the current Randr version. XRRQueryVersion 27bd23fbfaSmrg# returns the version from randr.h, NOT the version we set here. But we 28bd23fbfaSmrg# try to keep these the same. Note that the library has an extra 29bd23fbfaSmrg# digit in the version number to track changes which don't affect the 30bd23fbfaSmrg# protocol, so Xrandr version l.n.m corresponds to protocol version l.n 31bd23fbfaSmrg# 328bd17e5fSmrgAC_INIT([libXrandr], [1.4.1], 33706b6b52Smrg [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXrandr]) 34bd23fbfaSmrgAC_CONFIG_SRCDIR([Makefile.am]) 35bd23fbfaSmrgAC_CONFIG_HEADERS([config.h]) 36bd23fbfaSmrg 37bd23fbfaSmrg# Initialize Automake 38706b6b52SmrgAM_INIT_AUTOMAKE([foreign dist-bzip2]) 39b042e37fSmrg 40bd23fbfaSmrg# Initialize libtool 41bd23fbfaSmrgAC_PROG_LIBTOOL 420597fb56Smrg 43706b6b52Smrg# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS 44706b6b52Smrgm4_ifndef([XORG_MACROS_VERSION], 45706b6b52Smrg [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) 46706b6b52SmrgXORG_MACROS_VERSION(1.8) 47706b6b52SmrgXORG_DEFAULT_OPTIONS 48bd23fbfaSmrgXORG_CHECK_MALLOC_ZERO 49b042e37fSmrg 50b042e37fSmrg# Check randr configuration, strip extra digits from package version to 51b042e37fSmrg# find the required protocol version 52b042e37fSmrgRANDR_VERSION=[`echo $VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`] 53b042e37fSmrgAC_SUBST(RANDR_VERSION) 54b042e37fSmrg 55bd23fbfaSmrg# Obtain compiler/linker options for depedencies 56bd23fbfaSmrgPKG_CHECK_MODULES(RANDR, x11 randrproto >= $RANDR_VERSION xext xextproto xrender renderproto) 57b042e37fSmrg 588bd17e5fSmrg# Check for _XEatDataWords function that may be patched into older Xlib release 598bd17e5fSmrgSAVE_LIBS="$LIBS" 608bd17e5fSmrgLIBS="$RANDR_LIBS" 618bd17e5fSmrgAC_CHECK_FUNCS([_XEatDataWords]) 628bd17e5fSmrgLIBS="$SAVE_LIBS" 638bd17e5fSmrg 64bd23fbfaSmrgAC_CONFIG_FILES([Makefile 65bd23fbfaSmrg src/Makefile 66bd23fbfaSmrg man/Makefile 67bd23fbfaSmrg xrandr.pc]) 68bd23fbfaSmrgAC_OUTPUT 69