tetromino    14/11/24 04:59:06

  Added:                libgit2-glib-0.0.24-automagic-ssh.patch
  Log:
  Version bump, now covers more of libgit2's API
  
  (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 
0x18E5B6F2D8D5EC8D)

Revision  Changes    Path
1.1                  
dev-libs/libgit2-glib/files/libgit2-glib-0.0.24-automagic-ssh.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libgit2-glib/files/libgit2-glib-0.0.24-automagic-ssh.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libgit2-glib/files/libgit2-glib-0.0.24-automagic-ssh.patch?rev=1.1&content-type=text/plain

Index: libgit2-glib-0.0.24-automagic-ssh.patch
===================================================================
diff --git a/configure.ac b/configure.ac
index 8c1559c..94175c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,32 +79,44 @@ dnl 
===========================================================================
 dnl Check for libgit2 ssh support
 dnl ===========================================================================
 
-AC_MSG_CHECKING([for libgit2 ssh support])
-
-cflags_save="${CFLAGS}"
-libs_save="${LIBS}"
-
-CFLAGS="${LIBGIT2_GLIB_CFLAGS}"
-LIBS="${LIBGIT2_GLIB_LIBS}"
-
-AC_TRY_RUN([
-        #include <git2.h>
-        int
-        main(int argc, const char *argv[])
-        {
-                git_threads_init ();
-                return ((git_libgit2_features() & GIT_FEATURE_SSH) != 0) ? 0 : 
1;
-        }
-],[
-    AC_MSG_RESULT([yes])
-    git_ssh=yes
-],[
-    AC_MSG_RESULT([no])
-    git_ssh=no
-])
-
-CFLAGS="${cflags_save}"
-LIBS="${libs_save}"
+AC_ARG_ENABLE([ssh],
+              AS_HELP_STRING([--enable-ssh[=@<:@no/auto/yes@:>@]],[Build with 
libgit2 ssh support]),
+              [enable_ssh=$enableval],
+              [enable_ssh="auto"])
+
+git_ssh=no
+
+if test "x$enable_ssh" != "xno"; then
+    AC_MSG_CHECKING([for libgit2 ssh support])
+
+    cflags_save="${CFLAGS}"
+    libs_save="${LIBS}"
+
+    CFLAGS="${LIBGIT2_GLIB_CFLAGS}"
+    LIBS="${LIBGIT2_GLIB_LIBS}"
+
+    AC_TRY_RUN([
+            #include <git2.h>
+            int
+            main(int argc, const char *argv[])
+            {
+                    git_threads_init ();
+                    return ((git_libgit2_features() & GIT_FEATURE_SSH) != 0) ? 
0 : 1;
+            }
+    ],[
+        AC_MSG_RESULT([yes])
+        git_ssh=yes
+    ],[
+        AC_MSG_RESULT([no])
+        git_ssh=no
+        if test "x$enable_ssh" = "xyes"; then
+            AC_MSG_ERROR([libgit2 ssh support was requiested, but not found])
+        fi
+    ])
+
+    CFLAGS="${cflags_save}"
+    LIBS="${libs_save}"
+fi
 
 if test "x$git_ssh" = "xyes"; then
        LIBGIT2_GLIB_CFLAGS="${LIBGIT2_GLIB_CFLAGS} -DGIT_SSH=1"




Reply via email to