summaryrefslogtreecommitdiff
path: root/m4/as-nano.m4
blob: ca0945565a207e3c7bd0cb87fb932183fac67600 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
dnl as-version.m4 0.1.0

dnl autostars m4 macro for versioning (modified)

dnl Thomas Vander Stichele <thomas at apestaart dot org>
dnl David Schleef <ds@schleef.org>

dnl $Id: as-nano.m4,v 1.1 2005-01-21 07:26:34 ds Exp $

dnl AS_VERSION(ACTION-IF-NO-NANO, [ACTION-IF-NANO])

AC_DEFUN([AS_NANO],
[
  AC_MSG_CHECKING(nano version)

  NANO=$(echo AC_PACKAGE_VERSION | sed ['s/[0-9]\.[0-9]\.[0-9]\.*//'])
  AC_SUBST(NANO)

  if test x"$NANO" = x || test "x$NANO" = "x0" ; then
    AC_MSG_RESULT([0 (release)])
    NANO=0
    ifelse([$1], , :, [$1])
  else
    AC_MSG_RESULT($NANO)
    ifelse([$2], , :, [$2])
  fi
])