Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.2KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_split_version.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_SPLIT_VERSION
  8. #
  9. # DESCRIPTION
  10. #
  11. # Splits a version number in the format MAJOR.MINOR.POINT into its
  12. # separate components.
  13. #
  14. # Sets the variables.
  15. #
  16. # LICENSE
  17. #
  18. # Copyright (c) 2008 Tom Howard <tomhoward@users.sf.net>
  19. #
  20. # Copying and distribution of this file, with or without modification, are
  21. # permitted in any medium without royalty provided the copyright notice
  22. # and this notice are preserved. This file is offered as-is, without any
  23. # warranty.
  24. #serial 10
  25. AC_DEFUN([AX_SPLIT_VERSION],[
  26. AC_REQUIRE([AC_PROG_SED])
  27. AX_MAJOR_VERSION=`echo "$VERSION" | $SED 's/\([[^.]][[^.]]*\).*/\1/'`
  28. AX_MINOR_VERSION=`echo "$VERSION" | $SED 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'`
  29. AX_POINT_VERSION=`echo "$VERSION" | $SED 's/[[^.]][[^.]]*.[[^.]][[^.]]*.\(.*\)/\1/'`
  30. AC_MSG_CHECKING([Major version])
  31. AC_MSG_RESULT([$AX_MAJOR_VERSION])
  32. AC_MSG_CHECKING([Minor version])
  33. AC_MSG_RESULT([$AX_MINOR_VERSION])
  34. AC_MSG_CHECKING([Point version])
  35. AC_MSG_RESULT([$AX_POINT_VERSION])
  36. ])