configure.ac revision af7c02bd
1af7c02bdSmrgdnl 2af7c02bdSmrgdnl $Id: configure.ac,v 1.1.1.1 2008/07/30 02:46:39 mrg Exp $ 3af7c02bdSmrgdnl 4af7c02bdSmrgdnl Copyright © 2003 Keith Packard, Noah Levitt 5af7c02bdSmrgdnl 6af7c02bdSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 7af7c02bdSmrgdnl documentation for any purpose is hereby granted without fee, provided that 8af7c02bdSmrgdnl the above copyright notice appear in all copies and that both that 9af7c02bdSmrgdnl copyright notice and this permission notice appear in supporting 10af7c02bdSmrgdnl documentation, and that the name of Keith Packard not be used in 11af7c02bdSmrgdnl advertising or publicity pertaining to distribution of the software without 12af7c02bdSmrgdnl specific, written prior permission. Keith Packard makes no 13af7c02bdSmrgdnl representations about the suitability of this software for any purpose. It 14af7c02bdSmrgdnl is provided "as is" without express or implied warranty. 15af7c02bdSmrgdnl 16af7c02bdSmrgdnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 17af7c02bdSmrgdnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 18af7c02bdSmrgdnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR 19af7c02bdSmrgdnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 20af7c02bdSmrgdnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 21af7c02bdSmrgdnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 22af7c02bdSmrgdnl PERFORMANCE OF THIS SOFTWARE. 23af7c02bdSmrgdnl 24af7c02bdSmrgdnl Process this file with autoconf to create configure. 25af7c02bdSmrg 26af7c02bdSmrgAC_PREREQ([2.57]) 27af7c02bdSmrg 28af7c02bdSmrgdnl 29af7c02bdSmrgdnl Version should match the current XFixes version. XFixesQueryVersion 30af7c02bdSmrgdnl returns the version from xfixeswire.h, NOT the version we set here. But we 31af7c02bdSmrgdnl try to keep these the same. Note that the library has an extra 32af7c02bdSmrgdnl digit in the version number to track changes which don't affect the 33af7c02bdSmrgdnl protocol, so Xfixes version l.n.m corresponds to protocol version l.n 34af7c02bdSmrgdnl 35af7c02bdSmrgAC_INIT(libXdamage, 1.1.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXdamage) 36af7c02bdSmrgAM_INIT_AUTOMAKE([dist-bzip2]) 37af7c02bdSmrgAM_MAINTAINER_MODE 38af7c02bdSmrg 39af7c02bdSmrgAM_CONFIG_HEADER(config.h) 40af7c02bdSmrg 41af7c02bdSmrg# Check for progs 42af7c02bdSmrgAC_PROG_CC 43af7c02bdSmrgAC_PROG_LIBTOOL 44af7c02bdSmrg 45af7c02bdSmrg# Check for X 46af7c02bdSmrgPKG_CHECK_MODULES(X, x11, 47af7c02bdSmrg [x_found_with_pkgconfig=yes], 48af7c02bdSmrg [x_found_with_pkgconfig=no]) 49af7c02bdSmrg 50af7c02bdSmrgif test "$x_found_with_pkgconfig" = "no" 51af7c02bdSmrgthen 52af7c02bdSmrg AC_PATH_XTRA 53af7c02bdSmrg X_LIBS="$X_LIBS -lX11" 54af7c02bdSmrg 55af7c02bdSmrg if test "x$no_x" = "xyes" 56af7c02bdSmrg then 57af7c02bdSmrg AC_MSG_ERROR([X is required, but it was either disabled or not found.]) 58af7c02bdSmrg fi 59af7c02bdSmrg 60af7c02bdSmrg save_LIBS="$LIBS" 61af7c02bdSmrg save_CFLAGS="$CFLAGS" 62af7c02bdSmrg CFLAGS="$CFLAGS $X_CFLAGS" 63af7c02bdSmrg LIBS="$LIBS $X_LIBS" 64af7c02bdSmrg 65af7c02bdSmrg AC_MSG_CHECKING([for XTHREADS in Xlib]) 66af7c02bdSmrg AC_RUN_IFELSE( 67af7c02bdSmrg [AC_LANG_PROGRAM([[#include <X11/Xlib.h>]], 68af7c02bdSmrg [[return XInitThreads() == 0 ? 0 : 1;]])], 69af7c02bdSmrg [xthreads=no], 70af7c02bdSmrg [xthreads=yes], 71af7c02bdSmrg [xthreads=yes]) 72af7c02bdSmrg 73af7c02bdSmrg AC_MSG_RESULT($xthreads) 74af7c02bdSmrg 75af7c02bdSmrg LIBS="$save_LIBS" 76af7c02bdSmrg CFLAGS="$save_CFLAGS" 77af7c02bdSmrg 78af7c02bdSmrg if test "x$xthreads" = "xyes" 79af7c02bdSmrg then 80af7c02bdSmrg X_CFLAGS="$X_CFLAGS -DXTHREADS" 81af7c02bdSmrg fi 82af7c02bdSmrgfi 83af7c02bdSmrg 84af7c02bdSmrg# Check damageext configuration, strip extra digits from package version to 85af7c02bdSmrg# find the required protocol version 86af7c02bdSmrg 87af7c02bdSmrgDAMAGEEXT_VERSION=[`echo $VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`] 88af7c02bdSmrgAC_SUBST(DAMAGEEXT_VERSION) 89af7c02bdSmrgPKG_CHECK_MODULES(XDAMAGE, [damageproto >= $DAMAGEEXT_VERSION] xfixes fixesproto xextproto) 90af7c02bdSmrgAC_SUBST(XDAMAGE_CFLAGS) 91af7c02bdSmrg 92af7c02bdSmrgXORG_RELEASE_VERSION 93af7c02bdSmrg 94af7c02bdSmrgAC_OUTPUT([Makefile 95af7c02bdSmrg src/Makefile 96af7c02bdSmrg xdamage.pc]) 97af7c02bdSmrg 98