mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
0eae2cb8dc
Macros get from other projects keep their original names: gl_FSTYPENAME, AX_PATH_LIB_PCRE, etc. Macros initially writtem for MC have original names with prefix mc_: mc_VERSION, mc_CHECK_GLIB, etc Macros get from other projects and modified for MC keep their original names with prefix mc_: mc_cu_PREREQ_STAT_PROG, mc_AC_GET_FS_INFO. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
dnl @synopsis mc_VERSION
|
|
dnl
|
|
dnl Get current version of Midnight Commander from git tags
|
|
dnl
|
|
dnl @author Slava Zanko <slavazanko@gmail.com>
|
|
dnl @version 2009-12-30
|
|
dnl @license GPL
|
|
dnl @copyright Free Software Foundation, Inc.
|
|
|
|
AC_DEFUN([mc_VERSION],[
|
|
if test ! -f ${srcdir}/version.h; then
|
|
${srcdir}/maint/utils/version.sh ${srcdir}
|
|
fi
|
|
if test -f ${srcdir}/version.h; then
|
|
VERSION=$(grep '^#define MC_CURRENT_VERSION' ${srcdir}/version.h | sed 's/.*"\(.*\)"$/\1/')
|
|
else
|
|
VERSION="unknown"
|
|
fi
|
|
AC_SUBST(VERSION)
|
|
|
|
dnl Version and Release without dashes for the distro packages
|
|
DISTR_VERSION=`echo $VERSION | sed 's/^\([[^\-]]*\).*/\1/'`
|
|
DISTR_RELEASE=`echo $VERSION | sed 's/^[[^\-]]*\-\(.*\)/\1/' | sed 's/-/./g'`
|
|
|
|
if test `echo $VERSION | grep -c '\-pre'` -ne 0; then
|
|
DISTR_RELEASE="0.$DISTR_RELEASE"
|
|
else
|
|
if test `echo $VERSION | grep -c '\-'` -eq 0; then
|
|
DISTR_RELEASE=1
|
|
else
|
|
DISTR_RELEASE="2.$DISTR_RELEASE"
|
|
fi
|
|
fi
|
|
|
|
AC_SUBST(DISTR_VERSION)
|
|
AC_SUBST(DISTR_RELEASE)
|
|
|
|
])
|