[gnome-builder] build: ensure that libgit2-glib is installed using pkg-config



commit 3f6e97d4f56a27bb60f0847845d466c46c50b5c9
Author: Felix Schwarz <felix schwarz oss schwarz eu>
Date:   Mon Dec 12 11:29:00 2016 +0000

    build: ensure that libgit2-glib is installed using pkg-config
    
    This fixes an configuration error when libgit2-glib is not installed
    and we show the wrong error message. So first we check that the package
    is installed before trying our compilation checks.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=775978

 plugins/git/configure.ac |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/plugins/git/configure.ac b/plugins/git/configure.ac
index cd4474b..46a13fb 100644
--- a/plugins/git/configure.ac
+++ b/plugins/git/configure.ac
@@ -7,16 +7,16 @@ AC_ARG_ENABLE([git-plugin],
               [enable_git_plugin=$enableval],
               [enable_git_plugin=auto])
 
-AS_IF([test "$enable_git_plugin" != no],[
-       PKG_CHECK_MODULES(GIT,
-                         [libgit2-glib-1.0 >= ggit_required_version],
-                         [have_git=yes],
-                         [have_git=no])
+PKG_CHECK_MODULES(GIT,
+                  [libgit2-glib-1.0 >= ggit_required_version],
+                  [have_git=yes],
+                  [have_git=no])
 
-       AS_IF([test "$enable_git_plugin" = "yes" && test "$have_git" = "no"],[
-              AC_MSG_ERROR([--enable-git-plugin requires libgit2-glib-1.0 >= ggit_required_version])
-       ])
+AS_IF([test "$enable_git_plugin" == "yes" && test "$have_git" == "no"],[
+       AC_MSG_ERROR([--enable-git-plugin requires libgit2-glib-1.0 >= ggit_required_version])
+])
 
+AS_IF([test "$enable_git_plugin" != "no" && test "$have_git" == "yes"],[
        enable_git_plugin=yes
 
        dnl ***********************************************************************
@@ -50,7 +50,7 @@ AS_IF([test "$enable_git_plugin" != no],[
        ],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, please recompile a libgit2 with ssh support])])
        CFLAGS="${cflags_save}"
        LIBS="${libs_save}"
-])
+],[enable_git_plugin=no])
 
 AM_CONDITIONAL(ENABLE_GIT_PLUGIN, test x$enable_git_plugin = xyes)
 AC_CONFIG_FILES([plugins/git/Makefile])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]