mc-version.m4 555 B

1234567891011121314151617181920
  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 2009-06-02
  7. dnl @license GPL
  8. dnl @copyright Free Software Foundation, Inc.
  9. AC_DEFUN([MC_VERSION],[
  10. if test ! -f ${srcdir}/version.h; then
  11. ${srcdir}/maint/version.sh ${srcdir}
  12. fi
  13. if test -f ${srcdir}/version.h; then
  14. VERSION=$(grep '^#define MC_CURRENT_VERSION' ${srcdir}/version.h | sed 's/.*"\(.*\)"$/\1/')
  15. else
  16. VERSION="unknown"
  17. fi
  18. AC_SUBST(VERSION)
  19. ])