diff options
author | Oneric <oneric@oneric.stub> | 2021-03-24 00:17:27 +0100 |
---|---|---|
committer | Oneric <oneric@oneric.stub> | 2021-03-26 00:21:40 +0100 |
commit | 11493fbde283dc712cc45df9ceb209a1833c9a7f (patch) | |
tree | 1ddbe3b02c1315c1c5b4877cbeebd11438896f86 /configure.ac | |
parent | 686bfe62eb83e6b55870bde0c726ce34bfb73a85 (diff) | |
download | libass-11493fbde283dc712cc45df9ceb209a1833c9a7f.tar.bz2 libass-11493fbde283dc712cc45df9ceb209a1833c9a7f.tar.xz |
Print libass version
This could help us in future bug reports and we already do so for
shapers and freetype. Also include a guess about the source code
version, which may not be entirely reliable. Eg if custom tarballs are
involved or if patches are added after configure was called, the value
will be wrong.
But hopefully it will be "good enough" for most cases.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 6cb4948..38d4c23 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,5 @@ -AC_INIT(libass, 0.15.0) +m4_define([LIBASS_VERSION], [0.15.0]) +AC_INIT(libass, LIBASS_VERSION) AM_INIT_AUTOMAKE([foreign]) AC_CONFIG_MACRO_DIR([m4]) # Disable Fortran checks @@ -301,6 +302,21 @@ AM_COND_IF([ENABLE_LARGE_TILES], [ AC_DEFINE(CONFIG_LARGE_TILES, 0, [use small tiles]) ]) +## Make a guess about the source code version +AS_IF([test -d "${srcdir}/.git"], [ + AC_PATH_PROG([git_bin], [git]) + AS_IF([test -n "$git_bin"], [ + srcversion_string="commit: $("$git_bin" -C "$srcdir" describe --tags --long --always --dirty --broken --abbrev=40)" + ], [ + srcversion_string="custom after: LIBASS_VERSION" + ]) +], [ + dnl# Hope no one creates custom tarballs without adjusting the version + srcversion_string="tarball: LIBASS_VERSION" +]) +AC_DEFINE_UNQUOTED([CONFIG_SOURCEVERSION], ["$srcversion_string"], + [string containing info about the used source]) + ## Setup output beautifier. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |