(regex_command_for): move load of extension file to separate function.
[midnight-commander.git] / m4.include / mc-version.m4
blob51b6b77c446056a04711ad7e552a5fe9eb285e98
1 dnl @synopsis mc_VERSION
2 dnl
3 dnl Get current version of Midnight Commander from git tags
4 dnl
5 dnl @author Slava Zanko <slavazanko@gmail.com>
6 dnl @version 2021-04-04
7 dnl @license GPL
8 dnl @copyright Free Software Foundation, Inc.
9 dnl @modified Andrew Borodin <aborodin@vmail.ru>
11 AC_DEFUN([mc_VERSION],[
12     if test -f ${srcdir}/mc-version.h; then
13         VERSION=$(grep '^#define MC_CURRENT_VERSION' ${srcdir}/mc-version.h | sed 's/.*"\(.*\)"$/\1/')
14     else
15         VERSION="unknown"
16     fi
18     dnl Version without dashes for the man page
19     MAN_VERSION=`echo $VERSION | sed 's/^\([[^\-]]*\).*/\1/'`
20     AC_SUBST(MAN_VERSION)