1706f2543Smrgdnl Copyright 2005 Red Hat, Inc 2706f2543Smrgdnl 3706f2543Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 4706f2543Smrgdnl documentation for any purpose is hereby granted without fee, provided that 5706f2543Smrgdnl the above copyright notice appear in all copies and that both that 6706f2543Smrgdnl copyright notice and this permission notice appear in supporting 7706f2543Smrgdnl documentation. 8706f2543Smrgdnl 9706f2543Smrgdnl The above copyright notice and this permission notice shall be included 10706f2543Smrgdnl in all copies or substantial portions of the Software. 11706f2543Smrgdnl 12706f2543Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 13706f2543Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 14706f2543Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15706f2543Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 16706f2543Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 17706f2543Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 18706f2543Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 19706f2543Smrgdnl 20706f2543Smrgdnl Except as contained in this notice, the name of the copyright holders shall 21706f2543Smrgdnl not be used in advertising or otherwise to promote the sale, use or 22706f2543Smrgdnl other dealings in this Software without prior written authorization 23706f2543Smrgdnl from the copyright holders. 24706f2543Smrgdnl 25706f2543Smrg 26706f2543Smrg# XORG_DRIVER_CHECK_EXT() 27706f2543Smrg# -------------------------- 28706f2543Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 29706f2543Smrg# is defined, then add $1 to $REQUIRED_MODULES. 30706f2543Smrg 31706f2543SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 32706f2543Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 33706f2543Smrg SAVE_CFLAGS="$CFLAGS" 34706f2543Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 35706f2543Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 36706f2543Smrg#include "xorg-server.h" 37706f2543Smrg#if !defined $1 38706f2543Smrg#error $1 not defined 39706f2543Smrg#endif 40706f2543Smrg ]])], 41706f2543Smrg [_EXT_CHECK=yes], 42706f2543Smrg [_EXT_CHECK=no]) 43706f2543Smrg CFLAGS="$SAVE_CFLAGS" 44706f2543Smrg AC_MSG_CHECKING([if $1 is defined]) 45706f2543Smrg AC_MSG_RESULT([$_EXT_CHECK]) 46706f2543Smrg if test "$_EXT_CHECK" != no; then 47706f2543Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 48706f2543Smrg fi 49706f2543Smrg]) 50