aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpgme-config.in
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-08-21 13:49:03 +0000
committerWerner Koch <[email protected]>2016-08-21 13:49:03 +0000
commit3e60788810f93cfcd7f08e5882aff32ed7b6f831 (patch)
treeed0efb269d6a12d65deed4f418616147ed71edc0 /src/gpgme-config.in
parentcore: Remove (now) useless diagnostic (diff)
downloadgpgme-3e60788810f93cfcd7f08e5882aff32ed7b6f831.tar.gz
gpgme-3e60788810f93cfcd7f08e5882aff32ed7b6f831.zip
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 <[email protected]>
Diffstat (limited to 'src/gpgme-config.in')
-rw-r--r--src/gpgme-config.in35
1 files changed, 25 insertions, 10 deletions
diff --git a/src/gpgme-config.in b/src/gpgme-config.in
index 4be1e08e..0d9fda21 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@"
;;
*)