[rhythmbox] generate a python module holding some autoconf details



commit f590c3e3949fd435179294aa1a17a556ab631986
Author: Jonathan Matthew <jonathan d14n org>
Date:   Wed Mar 27 23:29:06 2013 +1000

    generate a python module holding some autoconf details
    
    Specifically, we need to know if we found a new enough version
    of libsecret at compile time, as there's currently no other way
    to find out what version we're using.

 configure.ac              |    6 ++++++
 plugins/rb/Makefile.am    |    3 ++-
 plugins/rb/rb.py          |    1 +
 plugins/rb/rbconfig.py.in |    4 ++++
 4 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 146ea4f..63bd2d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -244,7 +244,12 @@ if test "x$with_libsecret" != "xno"; then
           use_libsecret=yes
          AC_SUBST(LIBSECRET_CFLAGS)
          AC_SUBST(LIBSECRET_LIBS)
+         AC_SUBST(PY_LIBSECRET_ENABLED, True)
+       else
+         AC_SUBST(PY_LIBSECRET_ENABLED, False)
        fi
+else
+       AC_SUBST(PY_LIBSECRET_ENABLED, False)
 fi
 AM_CONDITIONAL(USE_LIBSECRET, test x"$use_libsecret" = xyes)
 
@@ -830,6 +835,7 @@ plugins/artsearch/Makefile
 plugins/magnatune/Makefile
 plugins/generic-player/Makefile
 plugins/rb/Makefile
+plugins/rb/rbconfig.py
 plugins/power-manager/Makefile
 plugins/mmkeys/Makefile
 plugins/context/Makefile
diff --git a/plugins/rb/Makefile.am b/plugins/rb/Makefile.am
index 12c680d..a7b1f4e 100644
--- a/plugins/rb/Makefile.am
+++ b/plugins/rb/Makefile.am
@@ -5,8 +5,9 @@ plugin_PYTHON = \
                Coroutine.py            \
                URLCache.py             \
                stringmatch.py          \
+               rbconfig.py             \
                rb.py
 
 plugin_DATA = rb.plugin
 
-EXTRA_DIST = $(plugin_DATA)
+EXTRA_DIST = $(plugin_DATA) rbconfig.py.in
diff --git a/plugins/rb/rb.py b/plugins/rb/rb.py
index 7f25f41..a06b493 100644
--- a/plugins/rb/rb.py
+++ b/plugins/rb/rb.py
@@ -39,6 +39,7 @@ from Loader import Loader
 from Loader import UpdateCheck
 from Coroutine import Coroutine
 from URLCache import URLCache
+import rbconfig
 
 def try_load_icon(theme, icon, size, flags):
        try:
diff --git a/plugins/rb/rbconfig.py.in b/plugins/rb/rbconfig.py.in
new file mode 100644
index 0000000..e3b42fa
--- /dev/null
+++ b/plugins/rb/rbconfig.py.in
@@ -0,0 +1,4 @@
+# -*- Mode: python; coding: utf-8; tab-width: 8; indent-tabs-mode: t; -*-
+
+libsecret_enabled = @PY_LIBSECRET_ENABLED@
+


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