[git] GPGME - branch, master, updated. gpgme-1.6.0-292-g3e60788

by Werner Koch cvs at cvs.gnupg.org
Sun Aug 21 15:59:01 CEST 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  3e60788810f93cfcd7f08e5882aff32ed7b6f831 (commit)
      from  30f156280f18500ee522db58aecd40711c8af685 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3e60788810f93cfcd7f08e5882aff32ed7b6f831
Author: Werner Koch <wk at gnupg.org>
Date:   Sun Aug 21 15:49:03 2016 +0200

    core: New commands --lang and --have-lang for gpgme-config
    
    * configure.ac (GPGME_CONFIG_AVAIL_LANG): New ac_subst.
    * src/gpgme-config.in (avail_lang): Add commands --lang and
    --have-lang.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/configure.ac b/configure.ac
index 9eb55bb..744b52a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -717,10 +717,12 @@ AH_BOTTOM([
 GPGME_CONFIG_LIBS="-lgpgme"
 GPGME_CONFIG_CFLAGS=""
 GPGME_CONFIG_HOST="$host"
+GPGME_CONFIG_AVAIL_LANG="$enabled_languages"
 AC_SUBST(GPGME_CONFIG_API_VERSION)
 AC_SUBST(GPGME_CONFIG_LIBS)
 AC_SUBST(GPGME_CONFIG_CFLAGS)
 AC_SUBST(GPGME_CONFIG_HOST)
+AC_SUBST(GPGME_CONFIG_AVAIL_LANG)
 
 # Frob'da Variables
 LTLIBOBJS=`echo "$LIB@&t at OBJS" |
diff --git a/doc/gpgme.texi b/doc/gpgme.texi
index ac0fffa..e8a735a 100644
--- a/doc/gpgme.texi
+++ b/doc/gpgme.texi
@@ -450,6 +450,19 @@ any other option to select the thread package you want to link with.
 Supported thread packages are @option{--thread=pth} and
 @option{--thread=pthread}.
 
+If you need to detect the installed language bindings you can use list
+them using:
+
+ at example
+gpgme-config --print-lang
+ at end example
+
+or test for the availability using
+
+ at example
+gpgme-config --have-lang=python && echo 'Bindings for Pythons available'
+ at end example
+
 
 @node Largefile Support (LFS)
 @section Largefile Support (LFS)
diff --git a/src/gpgme-config.in b/src/gpgme-config.in
index 4be1e08..0d9fda2 100644
--- a/src/gpgme-config.in
+++ b/src/gpgme-config.in
@@ -36,6 +36,8 @@ thread_modules=""
 libs_pthread="-lpthread"
 cflags_pthread=""
 
+avail_lang='c @GPGME_CONFIG_AVAIL_LANG@'
+
 # Configure glib.
 libs_glib="@GLIB_LIBS@"
 cflags_glib="@GLIB_CFLAGS@"
@@ -48,16 +50,16 @@ usage()
     cat <<EOF
 Usage: gpgme-config [OPTIONS]
 Options:
-	[--thread={${thread_modules}}]
-	[--prefix]
-	[--exec-prefix]
-	[--version]
-        [--api-version]
-        [--host]
-	[--libs]
-	[--cflags]
-        [--get-gpg]
-        [--get-gpgsm]
+	--thread={${thread_modules}}]
+	--prefix
+	--exec-prefix
+	--version
+        --api-version
+        --host
+	--libs
+	--cflags
+        --print-lang           Print available language bindings
+        --have-lang=LANG       Return success if LANG is available
 EOF
     exit $1
 }
@@ -178,10 +180,23 @@ while test $# -gt 0; do
 		usage 1 1>&2
 	    fi
 	    ;;
+	--print-lang)
+            output="$avail_lang"
+	    ;;
+	--have-lang=*)
+            for lang in $avail_lang; do
+                if test x"$lang" = x"$optarg"; then
+                    exit 0
+                fi
+            done
+            exit 1
+	    ;;
         --get-gpg)
+            # Deprecated
             output="$output @GPG@"
             ;;
         --get-gpgsm)
+            # Deprecated
             output="$output @GPGSM@"
             ;;
 	*)

-----------------------------------------------------------------------

Summary of changes:
 configure.ac        |  2 ++
 doc/gpgme.texi      | 13 +++++++++++++
 src/gpgme-config.in | 35 +++++++++++++++++++++++++----------
 3 files changed, 40 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list