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_RELEASE_VERSION 27# -------------------- 28# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 29 30AC_DEFUN([XORG_RELEASE_VERSION],[ 31 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 32 [`echo $PACKAGE_VERSION | cut -d . -f 1`], 33 [Major version of this package]) 34 PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 35 if test "x$PVM" = "x"; then 36 PVM="0" 37 fi 38 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 39 [$PVM], 40 [Minor version of this package]) 41 PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 42 if test "x$PVP" = "x"; then 43 PVP="0" 44 fi 45 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 46 [$PVP], 47 [Patch version of this package]) 48]) 49 50# XORG_CHANGELOG() 51# ---------------- 52# Minimum version: 1.2.0 53# 54# Defines the variable CHANGELOG_CMD as the command to generate 55# ChangeLog from git. 56# 57# 58AC_DEFUN([XORG_CHANGELOG], [ 59CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 60mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 61|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 62touch \$(top_srcdir)/ChangeLog; \ 63echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 64AC_SUBST([CHANGELOG_CMD]) 65]) # XORG_CHANGELOG 66