• Ralph Giles's avatar
    Set the autoconf version from git. · cfd4e2c3
    Ralph Giles authored
    AC_INIT requires that the version string passed in be 'static'
    so we can't use the output of a shell invocation. However, it
    can be computed by an m4 shell invocation. This is what autoconf
    itself does to embed its git version number in PACKAGE_VERSION.
    Doing this necessitates the 'echo -n' in git-version.sh. Make
    is smart enough to strip the trailing newline, but AC_INIT is
    not. We must also add -f to autoreconf. Otherwise, autogen.sh
    will only update configure when configure.ac changes, even if
    the output of git-version.sh has changed.
    This is still not ideal, since it runs at autogen.sh time, not
    at 'make' time, which is what we want. This seems to be a limitation
    of an upcoming automake release, which removes the old style
    with PACKAGE and VERSION set by shell variables.