X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=configure.ac;h=1784fa83d0541edcc695097d9203a193d9af26c3;hb=bde4f40b67b217f98982d1b2f0d7b877d31ed5e4;hp=c0f3258da449071733bf313745cf6c0da3ef9e65;hpb=fbf58a67bb0bc74d5fa6da14aafb9a0ac649df7c;p=i3%2Fi3 diff --git a/configure.ac b/configure.ac index c0f3258d..1784fa83 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Run autoreconf -fi to generate a configure script from this file. AC_PREREQ([2.69]) -AC_INIT([i3], [4.13], [https://github.com/i3/i3/issues]) +AC_INIT([i3], [4.15], [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]) @@ -31,8 +31,8 @@ AX_EXTEND_SRCDIR AS_IF([test -d ${srcdir}/.git], [ - VERSION="$(git describe --tags --abbrev=0)" - I3_VERSION="$(git describe --tags --always) ($(git log --pretty=format:%cd --date=short -n1), branch \\\"$(git describe --tags --always --all | sed s:heads/::)\\\")" + VERSION="$(git -C ${srcdir} describe --tags --abbrev=0)" + I3_VERSION="$(git -C ${srcdir} describe --tags --always) ($(git -C ${srcdir} log --pretty=format:%cd --date=short -n1), branch \\\"$(git -C ${srcdir} describe --tags --always --all | sed s:heads/::)\\\")" # Mirrors what libi3/is_debug_build.c does: is_release=$(test $(echo "${I3_VERSION}" | cut -d '(' -f 1 | wc -m) -lt 10 && echo yes || echo no) ], @@ -59,8 +59,6 @@ AX_CHECK_ENABLE_DEBUG([yes], , [UNUSED_NDEBUG], [$is_release]) AC_PROG_CC_C99 -AC_DEFINE_UNQUOTED(SYSCONFDIR, "`eval echo $sysconfdir`", [Location of system configuration files]) - # For strnlen() and vasprintf(). AC_USE_SYSTEM_EXTENSIONS @@ -83,9 +81,10 @@ AC_SEARCH_LIBS([floor], [m], , [AC_MSG_FAILURE([cannot find the required floor() # libev does not ship with a pkg-config file :(. AC_SEARCH_LIBS([ev_run], [ev], , [AC_MSG_FAILURE([cannot find the required ev_run() function despite trying to link with -lev])]) -AC_SEARCH_LIBS([shm_open], [rt]) +AC_SEARCH_LIBS([shm_open], [rt], [], [], [-pthread]) -AC_SEARCH_LIBS([iconv_open], [iconv], , [AC_MSG_FAILURE([cannot find the required iconv_open() function despite trying to link with -liconv])]) +AC_SEARCH_LIBS([iconv_open], [iconv], , +AC_SEARCH_LIBS([libiconv_open], [iconv], , [AC_MSG_FAILURE([cannot find the required iconv_open() function despite trying to link with -liconv])])) AX_PTHREAD @@ -154,8 +153,9 @@ else print_BUILD_MANS=no fi -git_dir=`git rev-parse --git-dir 2>/dev/null` -if test -n "$git_dir"; then +in_git_worktree=`git rev-parse --is-inside-work-tree 2>/dev/null` +if [[ "$in_git_worktree" = "true" ]]; then + git_dir=`git rev-parse --git-dir 2>/dev/null` srcdir=`dirname "$git_dir"` exclude_dir=`pwd | sed "s,^$srcdir,,g"` if ! grep -q "^$exclude_dir" "$git_dir/info/exclude"; then