| 1 |
dnl Copyright 2005 Red Hat, Inc |
| 2 |
dnl |
| 3 |
dnl Permission to use, copy, modify, distribute, and sell this software and its |
| 4 |
dnl documentation for any purpose is hereby granted without fee, provided that |
| 5 |
dnl the above copyright notice appear in all copies and that both that |
| 6 |
dnl copyright notice and this permission notice appear in supporting |
| 7 |
dnl documentation. |
| 8 |
dnl |
| 9 |
dnl The above copyright notice and this permission notice shall be included |
| 10 |
dnl in all copies or substantial portions of the Software. |
| 11 |
dnl |
| 12 |
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 13 |
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 14 |
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 15 |
dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 16 |
dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 17 |
dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 18 |
dnl OTHER DEALINGS IN THE SOFTWARE. |
| 19 |
dnl |
| 20 |
dnl Except as contained in this notice, the name of the copyright holders shall |
| 21 |
dnl not be used in advertising or otherwise to promote the sale, use or |
| 22 |
dnl other dealings in this Software without prior written authorization |
| 23 |
dnl from the copyright holders. |
| 24 |
dnl |
| 25 |
|
| 26 |
# XORG_RELEASE_VERSION |
| 27 |
# -------------------- |
| 28 |
# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. |
| 29 |
|
| 30 |
AC_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 |
# |
| 58 |
AC_DEFUN([XORG_CHANGELOG], [ |
| 59 |
CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ |
| 60 |
mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ |
| 61 |
|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ |
| 62 |
touch \$(top_srcdir)/ChangeLog; \ |
| 63 |
echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" |
| 64 |
AC_SUBST([CHANGELOG_CMD]) |
| 65 |
]) # XORG_CHANGELOG |