mc/m4.include/mc-version.m4
Slava Zanko 514cdf8340 Fixed bug in calculate version code when run under FreeBSD
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-07-07 11:17:23 +03:00

21 lines
555 B
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-06-02
dnl @license GPL
dnl @copyright Free Software Foundation, Inc.
AC_DEFUN([MC_VERSION],[
if test ! -f ${srcdir}/version.h; then
${srcdir}/maint/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)
])