33293329
33303330# ################ Begin configuration to use system libgit2 ##################
33313331if test " x${USE_BUNDLED_LIBGIT2} " = xno; then
3332-
3333- # The function 'git_buf_free' is deprecated in libgit2. Use
3334- # 'git_buf_dispose', if available, instead.
3332+ # The function 'git_buf_free' is deprecated in libgit2
3333+ # v0.28.0. Use 'git_buf_dispose', if available, instead.
33353334 { $as_echo " $as_me :${as_lineno-$LINENO } : checking whether the libgit2 function git_buf_dispose is available" >&5
33363335$as_echo_n " checking whether the libgit2 function git_buf_dispose is available... " >&6 ; }
33373336 have_buf_dispose=no
@@ -3356,9 +3355,9 @@ $as_echo "${have_buf_dispose}" >&6; }
33563355
33573356 # The constants GIT_OBJ_ANY, GIT_OBJ_BLOB, GIT_OBJ_COMMIT,
33583357 # GIT_OBJ_TAG_GIT_OBJ_TREE and GIT_REF_OID are deprecated in
3359- # libgit2. Use GIT_OBJECT_ANY, GIT_OBJECT_BLOB, GIT_OBJECT_COMMIT ,
3360- # GIT_OBJECT_TAG_GIT_OBJECT_TREE and GIT_REFERENCE_DIRECT, if
3361- # available, instead.
3358+ # libgit2 v0.28.0. Use GIT_OBJECT_ANY, GIT_OBJECT_BLOB,
3359+ # GIT_OBJECT_COMMIT, GIT_OBJECT_TAG_GIT_OBJECT_TREE and
3360+ # GIT_REFERENCE_DIRECT, if available, instead.
33623361 { $as_echo " $as_me :${as_lineno-$LINENO } : checking whether the libgit2 constant GIT_OBJECT_ANY is available" >&5
33633362$as_echo_n " checking whether the libgit2 constant GIT_OBJECT_ANY is available... " >&6 ; }
33643363 have_git_object_any=no
@@ -3405,6 +3404,32 @@ $as_echo "${have_git_error_last}" >&6; }
34053404 PKG_CFLAGS=" ${PKG_CFLAGS} -DGIT2R_HAVE_GIT_ERROR"
34063405 fi
34073406
3407+ # libgit v0.99.0: Several structures, enums and values have been
3408+ # renamed in libgit version 0.99.0. The former names are
3409+ # deprecated. See
3410+ # https://github.com/libgit2/libgit2/releases/tag/v0.99.0
3411+ { $as_echo " $as_me :${as_lineno-$LINENO } : checking whether the libgit2 function git_oid_is_zero is available" >&5
3412+ $as_echo_n " checking whether the libgit2 function git_oid_is_zero is available... " >&6 ; }
3413+ have_git_oid_is_zero=no
3414+ cat confdefs.h - << _ACEOF >conftest.$ac_ext
3415+ /* end confdefs.h. */
3416+ #include <git2.h>
3417+ int
3418+ main ()
3419+ {
3420+ git_oid_is_zero(NULL);
3421+ ;
3422+ return 0;
3423+ }
3424+ _ACEOF
3425+ PKG_CFLAGS=" ${PKG_CFLAGS} -Werror" " $RBIN " CMD SHLIB conftest.c \
3426+ 1>&5 2>&5 && have_git_oid_is_zero=yes
3427+ { $as_echo " $as_me :${as_lineno-$LINENO } : result: ${have_git_oid_is_zero} " >&5
3428+ $as_echo " ${have_git_oid_is_zero} " >&6 ; }
3429+ if test " x${have_git_oid_is_zero} " = xyes; then
3430+ PKG_CFLAGS=" ${PKG_CFLAGS} -DGIT2R_LIBGIT2_V0_99_0_RENAMES"
3431+ fi
3432+
34083433 # For debugging
34093434 echo " ----- Results of the git2r package configure -----"
34103435 echo " "
0 commit comments