[git] GPGME - branch, master, updated. gpgme-1.1.8-170-gcdefec0

by Werner Koch cvs at cvs.gnupg.org
Wed Apr 6 20:39:43 CEST 2011


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  cdefec02b385dcf3302e47d380812c3450e8713c (commit)
      from  e54fe47db8862b44a4fb669f55b45d9ec28b244d (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 cdefec02b385dcf3302e47d380812c3450e8713c
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Apr 6 20:10:45 2011 +0200

    gpgme-config cleanups and --host option
    
    gpgme-config.in: Add option --host.  Change options --cflags and
    --libs to collapse duplicate include and lib dirs.  Try to put extra
    libs at the end.
    
    Note that gpgme.m4 has not yet been extended.

diff --git a/ChangeLog b/ChangeLog
index 3163b54..cb88a8b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
 	* autogen.sh (--build-w32): Support option --build-w64.
 	* configure.ac (HAVE_W64_SYSTEM): Define.
 	(INSERT__TYPEDEFS_FOR_GPGME_H): New.
+	(GPGME_CONFIG_HOST): New.
 
 2011-02-02  Marcus Brinkmann  <mb at g10code.com>
 
@@ -992,7 +993,7 @@
 	* autogen.sh: Added option --build-w32.
 
 
- Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 g10 Code GmbH
+ Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2011 g10 Code GmbH
 
  This file is free software; as a special exception the author gives
  unlimited permission to copy and/or distribute it, with or without
diff --git a/configure.ac b/configure.ac
index b0f6e48..3aed5f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -901,9 +901,11 @@ AH_BOTTOM([
 # Substitution used for gpgme-config
 GPGME_CONFIG_LIBS="-lgpgme"
 GPGME_CONFIG_CFLAGS=""
+GPGME_CONFIG_HOST="$host"
 AC_SUBST(GPGME_CONFIG_API_VERSION)
 AC_SUBST(GPGME_CONFIG_LIBS)
 AC_SUBST(GPGME_CONFIG_CFLAGS)
+AC_SUBST(GPGME_CONFIG_HOST)
 
 # Frob'da Variables
 LTLIBOBJS=`echo "$LIB@&t at OBJS" |
diff --git a/src/ChangeLog b/src/ChangeLog
index 07b62bd..cf5a5ef 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
 2011-04-06  Werner Koch  <wk at g10code.com>
 
+	* gpgme-config.in: Add option --host.  Change options --cflags and
+	--libs to collapse duplicate include and lib dirs.  Try to put
+	extra libs at the end.
+
 	* gpgme.h.in: Use INSERT__TYPEDEFS_FOR_GPGME_H to include platform
 	specific typedefs.
 
diff --git a/src/gpgme-config.in b/src/gpgme-config.in
index 33ab456..db8c7ef 100644
--- a/src/gpgme-config.in
+++ b/src/gpgme-config.in
@@ -11,14 +11,16 @@
 
 prefix=@prefix@
 exec_prefix=@exec_prefix@
-includedir=@includedir@
-libdir=@libdir@
 
 # Make sure that no weird locale setting messes up our sed regexps etc.
 LC_COLLATE=C
 LC_ALL=C
 LANG=C
 
+# GPGME's own cflags and libs
+cflags="-I at includedir@"
+libs="-L at libdir@"
+
 # Network libraries.
 assuan_cflags="@LIBASSUAN_CFLAGS@"
 assuan_libs="@LIBASSUAN_LIBS@"
@@ -55,6 +57,7 @@ Options:
 	[--exec-prefix]
 	[--version]
         [--api-version]
+        [--host]
 	[--libs]
 	[--cflags]
         [--get-gpg]
@@ -101,46 +104,75 @@ while test $# -gt 0; do
 	    echo "@GPGME_CONFIG_API_VERSION@"
 	    exit 0
 	    ;;
+        --host)
+	    echo "@GPGME_CONFIG_HOST@"
+	    exit 0
+	    ;;
         --cflags)
-	    if test "x$includedir" != "x/usr/include" -a "x$includedir" != "x/include"; then
-		output="$output -I$includedir"
-	    fi
+            result=
+            tmp_c=
+            tmp_g=
 	    case "$thread_module" in
-	        pthread)
-	            output="$output $cflags_pthread"
-		    ;;
-	        pth)
-		    output="$output $cflags_pth"
-		    ;;
+	        pthread) tmp_c="$cflags_pthread" ;;
+	        pth)     tmp_c="$cflags_pth"     ;;
 	    esac
-	    output="$output $assuan_cflags $gpg_error_cflags"
-	    if test "x$with_glib" = "xyes"; then
-		output="$output $glib_cflags"
-	    fi
-	    ;;
+	    test "x$with_glib" = "xyes" && tmp_g="$cflags_glib"
+            for i in $cflags $tmp_c $assuan_cflags $gpg_error_cflags $tmp_g ; do
+              skip=no
+              case $i in
+                  -I/usr/include|-I/include)
+                      skip=yes
+                      ;;
+                  -I*)
+                      for j in $result ; do
+                          if test x"$j" = x"$i" ; then
+                              skip=yes
+                              break;
+                          fi
+                      done
+                      ;;
+              esac
+              if test $skip = no ; then
+                  result="$result $i"
+              fi
+            done
+            output="$output $result"
+            ;;
 	--libs)
-	    if test "x$libdir" != "x/usr/lib" -a "x$libdir" != "x/lib"; then
-		output="$output -L$libdir"
-	    fi
+            result=
+            tmp_x=
 	    case "$thread_module" in
-		pthread)
-	            output="$output -lgpgme-pthread $libs_pthread"
-		    ;;
-	        pth)
-		    output="$output -lgpgme-pth $libs_pth"
-		    ;;
+	        pthread) tmp_l="-lgpgme-pthread"; tmp_x="$libs_pthread" ;;
+	        pth)     tmp_l="-lgpgme-pth";     tmp_x="$libs_pth"  ;;
 		*)
-		    if test "x$with_glib" = "xyes"; then
-			output="$output -lgpgme-glib"
+		    if test "x$with_glib" = "xyes" ; then
+		         tmp_l="-lgpgme-glib"
+                         tmp_x="$libs_glib"
 		    else
-			output="$output -lgpgme"
+			 tmp_l="-lgpgme"
 		    fi
 		    ;;
 	    esac
-	    output="$output $assuan_libs $gpg_error_libs"
-	    if test "x$with_glib" = "xyes"; then
-		output="$output $glib_cflags"
-	    fi
+            for i in $libs $tmp_l $assuan_libs $gpg_error_libs $tmp_x; do
+              skip=no
+              case $i in
+                  -L/usr/lib|-L/lib)
+                      skip=yes
+                      ;;
+                  -L*|-l*)
+                      for j in $result ; do
+                          if test x"$j" = x"$i" ; then
+                              skip=yes
+                              break;
+                          fi
+                      done
+                      ;;
+              esac
+              if test $skip = no ; then
+                  result="$result $i"
+              fi
+            done
+            output="$output $result"
 	    ;;
 	--thread=*)
             for thread_mod in $thread_modules; do

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

Summary of changes:
 ChangeLog           |    3 +-
 configure.ac        |    2 +
 src/ChangeLog       |    4 ++
 src/gpgme-config.in |   96 ++++++++++++++++++++++++++++++++++-----------------
 4 files changed, 72 insertions(+), 33 deletions(-)


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




More information about the Gnupg-commits mailing list