1ffab5952Smrgdnl Copyright 2005 Red Hat, Inc
2ffab5952Smrgdnl
3ffab5952Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
4ffab5952Smrgdnl documentation for any purpose is hereby granted without fee, provided that
5ffab5952Smrgdnl the above copyright notice appear in all copies and that both that
6ffab5952Smrgdnl copyright notice and this permission notice appear in supporting
7ffab5952Smrgdnl documentation.
8ffab5952Smrgdnl
9ffab5952Smrgdnl The above copyright notice and this permission notice shall be included
10ffab5952Smrgdnl in all copies or substantial portions of the Software.
11ffab5952Smrgdnl
12ffab5952Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
13ffab5952Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14ffab5952Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
15ffab5952Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
16ffab5952Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17ffab5952Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
18ffab5952Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
19ffab5952Smrgdnl
20ffab5952Smrgdnl Except as contained in this notice, the name of the copyright holders shall
21ffab5952Smrgdnl not be used in advertising or otherwise to promote the sale, use or
22ffab5952Smrgdnl other dealings in this Software without prior written authorization
23ffab5952Smrgdnl from the copyright holders.
24ffab5952Smrgdnl
25ffab5952Smrg
26ffab5952Smrg# XORG_RELEASE_VERSION
27ffab5952Smrg# --------------------
28ffab5952Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
2943c16309Smrg
30ffab5952SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
31ffab5952Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
32ffab5952Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
33ffab5952Smrg		[Major version of this package])
34ffab5952Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
35ffab5952Smrg	if test "x$PVM" = "x"; then
36ffab5952Smrg		PVM="0"
37ffab5952Smrg	fi
38ffab5952Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
39ffab5952Smrg		[$PVM],
40ffab5952Smrg		[Minor version of this package])
41ffab5952Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
42ffab5952Smrg	if test "x$PVP" = "x"; then
43ffab5952Smrg		PVP="0"
44ffab5952Smrg	fi
45ffab5952Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
46ffab5952Smrg		[$PVP],
47ffab5952Smrg		[Patch version of this package])
48ffab5952Smrg])
49ffab5952Smrg
50ffab5952Smrg# XORG_CHANGELOG()
51ffab5952Smrg# ----------------
52ffab5952Smrg# Minimum version: 1.2.0
53ffab5952Smrg#
54ffab5952Smrg# Defines the variable CHANGELOG_CMD as the command to generate
55ffab5952Smrg# ChangeLog from git.
56ffab5952Smrg#
57ffab5952Smrg#
58ffab5952SmrgAC_DEFUN([XORG_CHANGELOG], [
599fa8ffe7SmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \
60ffab5952Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
619fa8ffe7Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
629fa8ffe7Smrgtouch \$(top_srcdir)/ChangeLog; \
639fa8ffe7Smrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
64ffab5952SmrgAC_SUBST([CHANGELOG_CMD])
65ffab5952Smrg]) # XORG_CHANGELOG
66