[gnome-builder] build: change auto to no if we fail to locate flatpak and deps



commit 15df97661bb0545420ddc38ac2eba4b8117d0bc8
Author: Christian Hergert <chergert redhat com>
Date:   Thu Mar 16 13:53:50 2017 -0700

    build: change auto to no if we fail to locate flatpak and deps
    
    We might not have located libgit2-glib+flatpak, so ensure that we set
    auto to no so that people building the software know that we failed to
    set proper dependencies.

 plugins/flatpak/configure.ac |   60 ++++++++++++++++++++++-------------------
 1 files changed, 32 insertions(+), 28 deletions(-)
---
diff --git a/plugins/flatpak/configure.ac b/plugins/flatpak/configure.ac
index 2baa79c..89cdbae 100644
--- a/plugins/flatpak/configure.ac
+++ b/plugins/flatpak/configure.ac
@@ -34,39 +34,43 @@ AS_IF([test "$enable_flatpak_plugin" != no],[
 
        AS_IF([test "$have_flatpak" = "yes" && test "$have_git" = "yes"],[
                enable_flatpak_plugin=yes
+       ],[
+               enable_flatpak_plugin=no
        ])
 
        dnl ***********************************************************************
        dnl Be extra careful about libgit2-glib requirements
        dnl ***********************************************************************
-       cflags_save="${CFLAGS}"
-       libs_save="${LIBS}"
-       CFLAGS="${CFLAGS} ${GIT_CFLAGS}"
-       LIBS="${LIBS} ${GIT_LIBS}"
-       # Thread-Safe
-       AC_MSG_CHECKING([for thread-safe support in libgit2])
-       AC_TRY_RUN([
-               #include <libgit2-glib/ggit.h>
-               int
-               main(int argc, const char *argv[])
-               {
-                       ggit_init ();
-                       return ((ggit_get_features() & GGIT_FEATURE_THREADS) != 0) ? 0 : 1;
-               }
-       ],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, please recompile a threadsafe version of libgit2 
(-DTHREADSAFE:BOOL=ON)])])
-       # SSH
-       AC_MSG_CHECKING([for SSH support in libgit2])
-       AC_TRY_RUN([
-               #include <libgit2-glib/ggit.h>
-               int
-               main(int argc, const char *argv[])
-               {
-                       ggit_init ();
-                       return ((ggit_get_features() & GGIT_FEATURE_SSH) != 0) ? 0 : 1;
-               }
-       ],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, please recompile a libgit2 with ssh support])])
-       CFLAGS="${cflags_save}"
-       LIBS="${libs_save}"
+       AS_IF([test "$enable_flatpak_plugin" = "yes"],[
+               cflags_save="${CFLAGS}"
+               libs_save="${LIBS}"
+               CFLAGS="${CFLAGS} ${GIT_CFLAGS}"
+               LIBS="${LIBS} ${GIT_LIBS}"
+               # Thread-Safe
+               AC_MSG_CHECKING([for thread-safe support in libgit2])
+               AC_TRY_RUN([
+                       #include <libgit2-glib/ggit.h>
+                       int
+                       main(int argc, const char *argv[])
+                       {
+                               ggit_init ();
+                               return ((ggit_get_features() & GGIT_FEATURE_THREADS) != 0) ? 0 : 1;
+                       }
+               ],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, please recompile a threadsafe version of libgit2 
(-DTHREADSAFE:BOOL=ON)])])
+               # SSH
+               AC_MSG_CHECKING([for SSH support in libgit2])
+               AC_TRY_RUN([
+                       #include <libgit2-glib/ggit.h>
+                       int
+                       main(int argc, const char *argv[])
+                       {
+                               ggit_init ();
+                               return ((ggit_get_features() & GGIT_FEATURE_SSH) != 0) ? 0 : 1;
+                       }
+               ],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, please recompile a libgit2 with ssh support])])
+               CFLAGS="${cflags_save}"
+               LIBS="${libs_save}"
+       ])
 ])
 
 AM_CONDITIONAL(ENABLE_FLATPAK_PLUGIN, [test "x$enable_flatpak_plugin" = "xyes"])


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