1*4882a593Smuzhiyundnl Copyright 2005 Red Hat, Inc 2*4882a593Smuzhiyundnl 3*4882a593Smuzhiyundnl Permission to use, copy, modify, distribute, and sell this software and its 4*4882a593Smuzhiyundnl documentation for any purpose is hereby granted without fee, provided that 5*4882a593Smuzhiyundnl the above copyright notice appear in all copies and that both that 6*4882a593Smuzhiyundnl copyright notice and this permission notice appear in supporting 7*4882a593Smuzhiyundnl documentation. 8*4882a593Smuzhiyundnl 9*4882a593Smuzhiyundnl The above copyright notice and this permission notice shall be included 10*4882a593Smuzhiyundnl in all copies or substantial portions of the Software. 11*4882a593Smuzhiyundnl 12*4882a593Smuzhiyundnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 13*4882a593Smuzhiyundnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 14*4882a593Smuzhiyundnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15*4882a593Smuzhiyundnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 16*4882a593Smuzhiyundnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 17*4882a593Smuzhiyundnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 18*4882a593Smuzhiyundnl OTHER DEALINGS IN THE SOFTWARE. 19*4882a593Smuzhiyundnl 20*4882a593Smuzhiyundnl Except as contained in this notice, the name of the copyright holders shall 21*4882a593Smuzhiyundnl not be used in advertising or otherwise to promote the sale, use or 22*4882a593Smuzhiyundnl other dealings in this Software without prior written authorization 23*4882a593Smuzhiyundnl from the copyright holders. 24*4882a593Smuzhiyundnl 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 27*4882a593Smuzhiyun# -------------------------- 28*4882a593Smuzhiyun# Checks for the MACRO define in xorg-server.h (from the sdk). If it 29*4882a593Smuzhiyun# is defined, then add the given PROTO to $REQUIRED_MODULES. 30*4882a593Smuzhiyun 31*4882a593SmuzhiyunAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 32*4882a593Smuzhiyun AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 33*4882a593Smuzhiyun SAVE_CFLAGS="$CFLAGS" 34*4882a593Smuzhiyun CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 35*4882a593Smuzhiyun AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 36*4882a593Smuzhiyun#include "xorg-server.h" 37*4882a593Smuzhiyun#if !defined $1 38*4882a593Smuzhiyun#error $1 not defined 39*4882a593Smuzhiyun#endif 40*4882a593Smuzhiyun ]])], 41*4882a593Smuzhiyun [_EXT_CHECK=yes], 42*4882a593Smuzhiyun [_EXT_CHECK=no]) 43*4882a593Smuzhiyun CFLAGS="$SAVE_CFLAGS" 44*4882a593Smuzhiyun AC_MSG_CHECKING([if $1 is defined]) 45*4882a593Smuzhiyun AC_MSG_RESULT([$_EXT_CHECK]) 46*4882a593Smuzhiyun if test "$_EXT_CHECK" != no; then 47*4882a593Smuzhiyun REQUIRED_MODULES="$REQUIRED_MODULES $2" 48*4882a593Smuzhiyun fi 49*4882a593Smuzhiyun]) 50