source: branches/FACT++_part_filenames/erfa/m4/erfa-numver.m4@ 19365

Last change on this file since 19365 was 18348, checked in by tbretz, 9 years ago
File size: 1.9 KB
Line 
1
2AC_DEFUN([ERFA_NUMVER],[
3AS_VAR_PUSHDEF([MAJOR],[MAJOR_VERSION])dnl
4AS_VAR_PUSHDEF([MINOR],[MINOR_VERSION])dnl
5AS_VAR_PUSHDEF([MICRO],[MICRO_VERSION])dnl
6AS_VAR_PUSHDEF([PATCH],[PATCH_VERSION])dnl
7test ".$PACKAGE_VERSION" = "." && PACKAGE_VERSION="$VERSION"
8AC_MSG_CHECKING([split $PACKAGE_VERSION])
9 MINOR=`echo $PACKAGE_VERSION`
10 MAJOR=`echo "$MINOR" | sed -e 's/[[.]].*//'`
11 MINOR=`echo "$MINOR" | sed -e "s/^$MAJOR//" -e 's/^.//'`
12 MICRO="$MINOR"
13 MINOR=`echo "$MICRO" | sed -e 's/[[.]].*//'`
14 MICRO=`echo "$MICRO" | sed -e "s/^$MINOR//" -e 's/^.//'`
15 PATCH="$MICRO"
16 MICRO=`echo "$PATCH" | sed -e 's/[[^0-9]].*//'`
17 PATCH=`echo "$PATCH" | sed -e "s/^$MICRO//" -e 's/[[-.]]//'`
18 if test "_$MICRO" = "_" ; then MICRO="0" ; fi
19 if test "_$MINOR" = "_" ; then MINOR="$MAJOR" ; MAJOR="0" ; fi
20 MINOR=`echo "$MINOR" | sed -e 's/[[^0-9]].*//'`
21AC_MSG_RESULT([ $MAJOR $MINOR $MICRO $PATCH])
22AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MAJOR, $MAJOR, [Define to the major version of this package.])
23AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MINOR, $MINOR, [Define to the minor version of this package.])
24AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MICRO, $MICRO, [Define to the micro version of this package.])
25AC_SUBST(PATCH)
26AS_VAR_POPDEF([PATCH])dnl
27AS_VAR_POPDEF([MICRO])dnl
28AS_VAR_POPDEF([MINOR])dnl
29AS_VAR_POPDEF([MAJOR])dnl
30])
31
32AC_DEFUN([ERFA_LIB_VERSION_INFO],[
33m4_ifndef([ERFA_C], [m4_define([ERFA_C], [$1])])
34m4_ifndef([ERFA_R], [m4_define([ERFA_R], [$2])])
35m4_ifndef([ERFA_A], [m4_define([ERFA_A], [$3])])
36m4_if(
37 m4_ifdef([ERFA_C], [ok]):m4_ifdef([ERFA_R], [ok]):m4_ifdef([ERFA_A], [ok]),
38 [ok:ok:ok],,
39 [m4_fatal([ERFA_LIB_VERSION_INFO should be called with current, revision and age arguments])])dnl
40AC_SUBST([VI_CURR], [m4_ifdef([ERFA_C], ['ERFA_C'])])dnl
41AC_SUBST([VI_REL], [m4_ifdef([ERFA_R], ['ERFA_R'])])dnl
42AC_SUBST([VI_AGE], [m4_ifdef([ERFA_A], ['ERFA_A'])])dnl
43vi_all=`echo $VI_CURR:$VI_REL:$VI_AGE`
44AC_SUBST([VI_ALL], [$vi_all])
45])
Note: See TracBrowser for help on using the repository browser.