Skip to content

Commit

Permalink
Fix check in build configuration for new sys subfolfder in libgit2
Browse files Browse the repository at this point in the history
  • Loading branch information
stewid committed Oct 5, 2024
1 parent 4ca0700 commit 341a73b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -2278,11 +2278,10 @@ See 'config.log' for more details" "$LINENO" 5; }
fi

################# Begin configuration to use system libgit2 ##################
# The function 'git_buf_free' is deprecated in libgit2
# v0.28.0. Use 'git_buf_dispose', if available, instead.
# Check for new sys subfolfder in libgit2.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether libgit2 includes new sys subfolder" >&5
printf %s "checking whether libgit2 includes new sys subfolder... " >&6; }
have_buf_dispose=no
have_sys_subfolder=no
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <git2/sys/errors.h>
Expand All @@ -2294,7 +2293,7 @@ git_error_set_str(0, NULL);
return 0;
}
_ACEOF
PKG_CFLAGS="${PKG_CFLAGS} -Werror" "$RBIN" CMD SHLIB conftest.c \
PKG_CFLAGS="${PKG_CFLAGS}" "$RBIN" CMD SHLIB conftest.c \
1>&5 2>&5 && have_sys_subfolder=yes
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${have_sys_subfolder}" >&5
printf "%s\n" "${have_sys_subfolder}" >&6; }
Expand Down
7 changes: 3 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,13 @@ if test "x${libgit2_ver_ok}" = xno; then
fi

################# Begin configuration to use system libgit2 ##################
# The function 'git_buf_free' is deprecated in libgit2
# v0.28.0. Use 'git_buf_dispose', if available, instead.
# Check for new sys subfolfder in libgit2.
AC_MSG_CHECKING([whether libgit2 includes new sys subfolder])
have_buf_dispose=no
have_sys_subfolder=no
AC_LANG_CONFTEST([AC_LANG_PROGRAM(
[[#include <git2/sys/errors.h>]],
[[git_error_set_str(0, NULL);]])])
PKG_CFLAGS="${PKG_CFLAGS} -Werror" "$RBIN" CMD SHLIB conftest.c \
PKG_CFLAGS="${PKG_CFLAGS}" "$RBIN" CMD SHLIB conftest.c \
1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD && have_sys_subfolder=yes
AC_MSG_RESULT([${have_sys_subfolder}])
if test "x${have_sys_subfolder}" = xyes; then
Expand Down

0 comments on commit 341a73b

Please sign in to comment.