1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
|
dnl Guile-Git --- GNU Guile bindings of libgit2
dnl Copyright © 2016-2018 Erik Edrosa <erik.edrosa@gmail.com>
dnl Copyright © 2017, 2019-2021, 2024 Ludovic Courtès <ludo@gnu.org>
dnl Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
dnl
dnl This file is part of Guile-Git.
dnl
dnl Guile-Git is free software; you can redistribute it and/or modify it
dnl under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 3 of the License, or
dnl (at your option) any later version.
dnl
dnl Guile-Git is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with Guile-Git. If not, see <http://www.gnu.org/licenses/>.
AC_INIT([Guile-Git], [0.9.0], [], [], [https://gitlab.com/guile-git/guile-git/])
AC_CONFIG_SRCDIR(git)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([-Wall -Werror foreign color-tests])
dnl Enable silent rules by default.
AM_SILENT_RULES([yes])
GUILE_PKG([3.0 2.2])
GUILE_PROGS
dnl (srfi srfi-64) appeared in Guile 2.0.11.
GUILE_MODULE_REQUIRED([srfi srfi-64])
GUILE_MODULE_REQUIRED([bytestructures guile])
PKG_CHECK_MODULES([LIBGIT2], [libgit2 >= 1.3.0])
PKG_CHECK_VAR([LIBGIT2_LIBDIR], [libgit2], [libdir])
AC_MSG_CHECKING([libgit2 library path])
AS_IF([test "x$LIBGIT2_LIBDIR" = "x"], [
AC_MSG_FAILURE([Unable to identify libgit2 lib path.])
])
AC_SUBST([LIBGIT2_LIBDIR])
AC_PROG_CC
dnl Does 'git_status_options' have 'rename_threshold'?
dnl It's missing in libgit2 1.3, available in 1.5.
AC_CHECK_MEMBER([git_status_options.rename_threshold], [], [],
[[#include <git2.h>]])
if test "x$ac_cv_member_git_status_options_rename_threshold" = "xyes"; then
HAVE_STATUS_OPTIONS_RENAME_THRESHOLD="#true"
else
HAVE_STATUS_OPTIONS_RENAME_THRESHOLD="#false"
fi
AC_SUBST([HAVE_STATUS_OPTIONS_RENAME_THRESHOLD])
dnl Does 'git_fetch_options' have 'follow_redirects'?
dnl It's missing in libgit2 1.3, available in 1.5.
AC_CHECK_MEMBER([git_fetch_options.follow_redirects], [], [],
[[#include <git2.h>]])
if test "x$ac_cv_member_git_fetch_options_follow_redirects" = "xyes"; then
HAVE_FETCH_OPTIONS_FOLLOW_REDIRECTS="#true"
else
HAVE_FETCH_OPTIONS_FOLLOW_REDIRECTS="#false"
fi
AC_SUBST([HAVE_FETCH_OPTIONS_FOLLOW_REDIRECTS])
dnl Does 'git_fetch_options' have 'depth'? It's new in 1.7.
AC_CHECK_MEMBER([git_fetch_options.depth], [], [],
[[#include <git2.h>]])
if test "x$ac_cv_member_git_fetch_options_depth" = "xyes"; then
HAVE_FETCH_OPTIONS_DEPTH="#true"
else
HAVE_FETCH_OPTIONS_DEPTH="#false"
fi
AC_SUBST([HAVE_FETCH_OPTIONS_DEPTH])
dnl Does 'git_config_entry' have 'backend_type' and 'origin_path'? New in 1.8.
AC_CHECK_MEMBER([git_config_entry.backend_type], [], [],
[[#include <git2.h>]])
if test "x$ac_cv_member_git_config_entry_backend_type" = "xyes"; then
HAVE_CONFIG_ENTRY_BACKEND_TYPE="#true"
else
HAVE_CONFIG_ENTRY_BACKEND_TYPE="#false"
fi
AC_SUBST([HAVE_CONFIG_ENTRY_BACKEND_TYPE])
dnl Does 'git_config_entry' have 'free'? Removed in 1.9.
AC_CHECK_MEMBER([git_config_entry.free], [], [],
[[#include <git2.h>]])
if test "x$ac_cv_member_git_config_entry_free" = "xyes"; then
HAVE_CONFIG_ENTRY_FREE="#true"
else
HAVE_CONFIG_ENTRY_FREE="#false"
fi
AC_SUBST([HAVE_CONFIG_ENTRY_FREE])
dnl Does 'git_diff_options' have 'oid_type'? It's new in 1.7.
AC_CHECK_MEMBER([git_diff_options.oid_type], [], [],
[[#include <git2.h>]])
if test "x$ac_cv_member_git_diff_options_oid_type" = "xyes"; then
HAVE_DIFF_OPTIONS_OID_TYPE="#true"
else
HAVE_DIFF_OPTIONS_OID_TYPE="#false"
fi
AC_SUBST([HAVE_DIFF_OPTIONS_OID_TYPE])
dnl Does 'git_remote_callbacks' have 'update_refs'? New in 1.9.
AC_CHECK_MEMBER([git_remote_callbacks.update_refs], [], [],
[[#include <git2.h>]])
if test "x$ac_cv_member_git_remote_callbacks_update_refs" = "xyes"; then
HAVE_REMOTE_CALLBACKS_UPDATE_REFS="#true"
else
HAVE_REMOTE_CALLBACKS_UPDATE_REFS="#false"
fi
AC_SUBST([HAVE_REMOTE_CALLBACKS_UPDATE_REFS])
dnl 'GIT_OPT_SET_SERVER_CONNECT_TIMEOUT' & co. are new in 1.7.
GUILE_GIT_CHECK_DECLARATION([GIT_OPT_SET_SERVER_CONNECT_TIMEOUT])
dnl 'GIT_OPT_SET_HOMEDIR' appeared in 1.6 or so.
GUILE_GIT_CHECK_DECLARATION([GIT_OPT_SET_HOMEDIR])
dnl Likewise.
GUILE_GIT_CHECK_DECLARATION([GIT_OPT_SET_USER_AGENT_PRODUCT])
dnl Those binaries are required for ssh authentication tests.
AC_PATH_PROG([SSHD], [sshd])
AC_PATH_PROG([SSH_AGENT], [ssh-agent])
AC_PATH_PROG([SSH_ADD], [ssh-add])
AC_PATH_PROG([GIT_UPLOAD_PACK], [git-upload-pack])
AC_SUBST([SSHD])
AC_CONFIG_FILES([Makefile git/configuration.scm tests/ssh.scm])
AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env])
if test "$cross_compiling" != no; then
GUILE_TARGET="--target=$host_alias"
AC_SUBST([GUILE_TARGET])
fi
AC_OUTPUT
|