aclocal.glob, m4/: Split the monster into separate `aclocal'-ish files.
[runlisp] / m4 / mdw-auto-version.m4
1 dnl -*-autoconf-*-
2
3 dnl --- *@-mdw_AUTO_VERSION-@* ---
4 dnl
5 dnl Author: Mark Wooding
6 dnl
7 dnl Synopsis: mdw_AUTO_VERSION
8 dnl
9 dnl Arguments: ---
10 dnl
11 dnl Use: Defines an m4 macro AUTO_VERSION which contains the current
12 dnl version number, worked out in some clever way.
13
14 AC_DEFUN([mdw_AUTO_VERSION], [nobody cares...])
15 m4_define([mdw_AUTO_VERSION], [m4_define([AUTO_VERSION], m4_esyscmd([
16 ver=UNKNOWN
17 for pre in ./ config/; do
18 for post in "" .in; do
19 try=${pre}auto-version${post}
20 if test -x $try; then ver=$("$try"); break; fi
21 done
22 done
23 echo -n "$ver"
24 ]))])