]> git.sur5r.net Git - i3/i3/blobdiff - configure.ac
Fix memory leaks (#2560)
[i3/i3] / configure.ac
index 01b4d3090dec582e75313905e6207a247de8c3e5..1a91b3b1d35202e1bdf10e72b9036505c44e16a1 100644 (file)
@@ -2,7 +2,7 @@
 # Run autoreconf -fi to generate a configure script from this file.
 
 AC_PREREQ([2.69])
-AC_INIT([i3], [4.12], [https://github.com/i3/i3/issues])
+AC_INIT([i3], [4.13], [https://github.com/i3/i3/issues])
 # For AX_EXTEND_SRCDIR
 AX_ENABLE_BUILDDIR
 AM_INIT_AUTOMAKE([foreign subdir-objects -Wall no-dist-gzip dist-bzip2])
@@ -32,9 +32,10 @@ AS_IF([test -d ${srcdir}/.git],
       ],
       [
         VERSION="$(cut -d '-' -f 1 ${srcdir}/I3_VERSION | cut -d ' ' -f 1)"
-        I3_VERSION="$(cat ${srcdir}/I3_VERSION)"
+        I3_VERSION="$(sed -e 's/@<:@\"?\\@:>@/\\&/g' ${srcdir}/I3_VERSION)"
         is_release="$(grep -q non-git ${srcdir}/I3_VERSION && echo no || echo yes)"
       ])
+AC_SUBST([I3_VERSION], [$I3_VERSION])
 MAJOR_VERSION="$(echo ${VERSION} | cut -d '.' -f 1)"
 MINOR_VERSION="$(echo ${VERSION} | cut -d '.' -f 2)"
 PATCH_VERSION="$(echo ${VERSION} | cut -d '.' -f 3)"
@@ -145,6 +146,15 @@ else
        print_BUILD_MANS=no
 fi
 
+git_dir=`git rev-parse --git-dir 2>/dev/null`
+if test -n "$git_dir"; then
+       srcdir=`dirname "$git_dir"`
+       exclude_dir=`pwd | sed "s,^$srcdir,,g"`
+       if ! grep -q "^$exclude_dir" "$git_dir/info/exclude"; then
+               echo "$exclude_dir" >> "$git_dir/info/exclude"
+       fi
+fi
+
 echo \
 "--------------------------------------------------------------------------------
 build configured: