X-Git-Url: https://git.distorted.org.uk/~mdw/cfd/blobdiff_plain/1f79a056146f0b172111b8379ccc344002848e66..cc30efbfa4b54891d4973627e3967109b1d76156:/aclocal.glob diff --git a/aclocal.glob b/aclocal.glob index 283f695..eb0e4d0 100644 --- a/aclocal.glob +++ b/aclocal.glob @@ -36,20 +36,16 @@ dnl dnl Use: Defines an m4 macro AUTO_VERSION which contains the current dnl version number, worked out in some clever way. -dnl AC_DEFUN([mdw_AUTO_VERSION], [nobody cares...]) +AC_DEFUN([mdw_AUTO_VERSION], [nobody cares...]) m4_define([mdw_AUTO_VERSION], [m4_define([AUTO_VERSION], m4_esyscmd([ - if test -d .git && version=$(git describe --abbrev=4 2>/dev/null); then - case "$(git diff-index --name-only HEAD)" in - "") ;; *) version="$version+" ;; - esac - elif cat RELEASE 2>/dev/null; then - version=$(cat RELEASE) - elif test -f debian/changelog; then - version=$(sed -n '/^.*(\(.*\)).*$/ { s::\1:p; q; }' debian/changelog) - else - echo UNKNOWN - fi - echo -n $version + ver=UNKNOWN + for pre in ./ config/; do + for post in "" .in; do + try=${pre}auto-version${post} + if test -x $try; then ver=$("$try"); break; fi + done + done + echo -n "$ver" ]))]) dnl --- *@-mdw_LIBTOOL_VERSION_INFO-@* ---