acinclude.m4 revision 7e6fb56f
1dnl Copyright 2005 Red Hat, Inc 2dnl 3dnl Permission to use, copy, modify, distribute, and sell this software and its 4dnl documentation for any purpose is hereby granted without fee, provided that 5dnl the above copyright notice appear in all copies and that both that 6dnl copyright notice and this permission notice appear in supporting 7dnl documentation. 8dnl 9dnl The above copyright notice and this permission notice shall be included 10dnl in all copies or substantial portions of the Software. 11dnl 12dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 13dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 14dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 15dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 16dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 17dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 18dnl OTHER DEALINGS IN THE SOFTWARE. 19dnl 20dnl Except as contained in this notice, the name of the copyright holders shall 21dnl not be used in advertising or otherwise to promote the sale, use or 22dnl other dealings in this Software without prior written authorization 23dnl from the copyright holders. 24dnl 25 26# XORG_DRIVER_CHECK_EXT() 27# -------------------------- 28# Checks for the $1 define in xorg-server.h (from the sdk). If it 29# is defined, then add $1 to $REQUIRED_MODULES. 30 31AC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 32 SAVE_CFLAGS="$CFLAGS" 33 CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 34 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 35#include "xorg-server.h" 36#if !defined $1 37#error $1 not defined 38#endif 39 ]])], 40 [_EXT_CHECK=yes], 41 [_EXT_CHECK=no]) 42 CFLAGS="$SAVE_CFLAGS" 43 AC_MSG_CHECKING([if $1 is defined]) 44 AC_MSG_RESULT([$_EXT_CHECK]) 45 if test "$_EXT_CHECK" != no; then 46 REQUIRED_MODULES="$REQUIRED_MODULES $2" 47 fi 48]) 49dnl Copyright 2005 Red Hat, Inc 50dnl 51dnl Permission to use, copy, modify, distribute, and sell this software and its 52dnl documentation for any purpose is hereby granted without fee, provided that 53dnl the above copyright notice appear in all copies and that both that 54dnl copyright notice and this permission notice appear in supporting 55dnl documentation. 56dnl 57dnl The above copyright notice and this permission notice shall be included 58dnl in all copies or substantial portions of the Software. 59dnl 60dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 61dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 62dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 63dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 64dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 65dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 66dnl OTHER DEALINGS IN THE SOFTWARE. 67dnl 68dnl Except as contained in this notice, the name of the copyright holders shall 69dnl not be used in advertising or otherwise to promote the sale, use or 70dnl other dealings in this Software without prior written authorization 71dnl from the copyright holders. 72dnl 73 74# XORG_RELEASE_VERSION 75# -------------------- 76# Adds --with/without-release-string and changes the PACKAGE and 77# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 78# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. 79 80AC_DEFUN([XORG_RELEASE_VERSION],[ 81 AC_ARG_WITH(release-version, 82 AC_HELP_STRING([--with-release-version=STRING], 83 [Use release version string in package name]), 84 [RELEASE_VERSION="$withval"], 85 [RELEASE_VERSION=""]) 86 if test "x$RELEASE_VERSION" != "x"; then 87 PACKAGE="$PACKAGE-$RELEASE_VERSION" 88 PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 89 AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 90 fi 91]) 92