加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ax_split_version.m4 1.42 KB
一键复制 编辑 原始数据 按行查看 历史
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_split_version.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_SPLIT_VERSION
#
# DESCRIPTION
#
# Splits a version number in the format MAJOR.MINOR.POINT into its
# separate components.
#
# Sets the variables.
#
# LICENSE
#
# Copyright (c) 2020 Roy Stogner
# Copyright (c) 2008 Tom Howard <tomhoward@users.sf.net>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 10
AC_DEFUN([AX_SPLIT_VERSION],[
AC_REQUIRE([AC_PROG_SED])
AX_MAJOR_VERSION=`echo "$VERSION" | $SED 's/\([[^.]][[^.]]*\).*/\1/'`
AX_MINOR_VERSION=`echo "$VERSION" | $SED -n 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/p'`
AS_IF([test "x$AX_MINOR_VERSION" = "x"], [AX_MINOR_VERSION=0])
AX_POINT_VERSION=`echo "$VERSION" | $SED -n 's/[[^.]][[^.]]*.[[^.]][[^.]]*.\(.*\)/\1/p'`
AS_IF([test "x$AX_POINT_VERSION" = "x"], [AX_POINT_VERSION=0])
AC_MSG_CHECKING([Major version])
AC_MSG_RESULT([$AX_MAJOR_VERSION])
AC_MSG_CHECKING([Minor version])
AC_MSG_RESULT([$AX_MINOR_VERSION])
AC_MSG_CHECKING([Point version])
AC_MSG_RESULT([$AX_POINT_VERSION])
])
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化