mc-version.m4 637 B

123456789101112131415161718192021
  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>
  10. AC_DEFUN([mc_VERSION],[
  11. if test -f ${srcdir}/mc-version.h; then
  12. VERSION=$(grep '^#define MC_CURRENT_VERSION' ${srcdir}/mc-version.h | ${SED-sed} 's/.*"\(.*\)"$/\1/')
  13. else
  14. VERSION="unknown"
  15. fi
  16. dnl Version without dashes for the man page
  17. MAN_VERSION=`echo $VERSION | sed 's/^\([[^\-]]*\).*/\1/'`
  18. AC_SUBST(MAN_VERSION)
  19. ])