--- liblscp/trunk/configure.ac 2010/09/28 18:00:38 2132 +++ liblscp/trunk/configure.ac 2019/12/21 11:57:22 3661 @@ -1,8 +1,9 @@ # Process this file with autoconf to produce a configure script. AC_INIT(src/client.c) -AM_CONFIG_HEADER(src/config.h) +AC_CONFIG_HEADERS([src/config.h]) +AC_CONFIG_MACRO_DIR([.m4]) -AM_INIT_AUTOMAKE(liblscp, 0.5.6.2) +AM_INIT_AUTOMAKE(liblscp, 0.6.1) #------------------------------------------------------------------------------------ # Rules for library version information: @@ -20,10 +21,28 @@ # 6. If any interfaces have been removed since the last public release, then set age # to 0. -SHARED_VERSION_INFO="6:0:0" +SHARED_VERSION_INFO="6:1:0" AC_SUBST(SHARED_VERSION_INFO) +# Build version string. +AC_CACHE_VAL([ac_cv_build_version], [ + ac_cv_build_version=$(git describe --tags --dirty --abbrev=6 2>/dev/null) + if test -n "$ac_cv_build_version"; then + ac_cv_build_version=$(echo $ac_cv_build_version | sed 's/^[[^_]]*[[_v]]//i') + ac_cv_build_version=$(echo $ac_cv_build_version | sed 's/-g/git./') + ac_cv_build_version=$(echo $ac_cv_build_version | sed 's/[[_|-]]\+/./g') + ac_cv_build_version_extra=$(git rev-parse --abbrev-ref HEAD 2>/dev/null) + if test "x$ac_cv_build_version_extra" != "xmaster"; then + ac_cv_build_version="$ac_cv_build_version [[$ac_cv_build_version_extra]]" + fi + else + ac_cv_build_version=$PACKAGE_VERSION + fi +]) +ac_build_version="$ac_cv_build_version" +AC_SUBST(ac_build_version) + # Checks for programs. AC_PROG_CC AC_LIBTOOL_WIN32_DLL