[git] GCRYPT - branch, master, updated. post-nuke-of-trailing-ws-17-ge7f33df

by Werner Koch cvs at cvs.gnupg.org
Wed Feb 23 16:54:46 CET 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 "The GNU crypto library".

The branch, master has been updated
       via  e7f33df5e5b102f3c07a6dac1bfd1376f4f9267b (commit)
      from  b47b2f9c063d9a0bad7c33fb7ba158c23522b849 (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 e7f33df5e5b102f3c07a6dac1bfd1376f4f9267b
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Feb 23 16:30:38 2011 +0100

    Add option host to libgcrypt-config.
    
    Also update libgcrypt.m4 for better user experience when
    cross-building.

diff --git a/ChangeLog b/ChangeLog
index a9b0895..e499f15 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2011-02-23  Werner Koch  <wk at g10code.com>
 
+	* configure.ac (LIBGCRYPT_CONFIG_HOST): New.
+
 	* acinclude.m4 (AM_PATH_GPG_ERROR): Remove.
 
 2011-02-21  Werner Koch  <wk at g10code.com>
diff --git a/configure.ac b/configure.ac
index 013ff3a..618a5ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -154,6 +154,7 @@ LT_LANG([Windows Resource])
 # Used by libgcrypt-config
 LIBGCRYPT_CONFIG_LIBS="-lgcrypt"
 LIBGCRYPT_CONFIG_CFLAGS=""
+LIBGCRYPT_CONFIG_HOST="$host"
 
 # Definitions for symmetric ciphers.
 available_ciphers="arcfour blowfish cast5 des aes twofish serpent rfc2268 seed"
@@ -963,6 +964,7 @@ CL_AS_NOEXECSTACK
 AC_SUBST(LIBGCRYPT_CONFIG_API_VERSION)
 AC_SUBST(LIBGCRYPT_CONFIG_LIBS)
 AC_SUBST(LIBGCRYPT_CONFIG_CFLAGS)
+AC_SUBST(LIBGCRYPT_CONFIG_HOST)
 AC_SUBST(LIBGCRYPT_THREAD_MODULES)
 
 AC_CONFIG_COMMANDS([gcrypt-conf],[[
diff --git a/src/ChangeLog b/src/ChangeLog
index a9523cc..98f38db 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2011-02-23  Werner Koch  <wk at g10code.com>
+
+	* libgcrypt-config.in: Add option --host.
+	* libgcrypt.m4: Use AC_PROG_TOOL to find the config script.  Print
+	a warning is the config scripts does not match the configure host.
+
 2011-02-21  Werner Koch  <wk at g10code.com>
 
 	* global.c (gcry_check_version): Do not take the patchlevel in
diff --git a/src/libgcrypt-config.in b/src/libgcrypt-config.in
index be6df8a..c052638 100644
--- a/src/libgcrypt-config.in
+++ b/src/libgcrypt-config.in
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 1999, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2002, 2003, 2004, 2011 Free Software Foundation, Inc.
 #
 # This file is free software; as a special exception the author gives
 # unlimited permission to copy and/or distribute it, with or without
@@ -27,6 +27,9 @@ cflags="@LIBGCRYPT_CONFIG_CFLAGS@"
 # API info
 api_version="@LIBGCRYPT_CONFIG_API_VERSION@"
 
+# Configured for host
+my_host="@LIBGCRYPT_CONFIG_HOST@"
+
 # Misc information.
 symmetric_ciphers="@LIBGCRYPT_CIPHERS@"
 asymmetric_ciphers="@LIBGCRYPT_PUBKEY_CIPHERS@"
@@ -40,6 +43,7 @@ echo_algorithms=no
 echo_exec_prefix=no
 echo_version=no
 echo_api_version=no
+echo_host=no
 
 # Prints usage information.
 usage()
@@ -54,6 +58,7 @@ Options:
 	[--libs]
 	[--cflags]
 	[--algorithms]
+        [--host]
 EOF
     exit $1
 }
@@ -106,6 +111,9 @@ while test $# -gt 0; do
 	--algorithms)
 	    echo_algorithms=yes
 	    ;;
+        --host)
+            echo_host=yes
+            ;;
 	*)
 	    usage 1 1>&2
 	    ;;
@@ -170,6 +178,10 @@ if test "$echo_api_version" = "yes"; then
     echo "$api_version"
 fi
 
+if test "$echo_host" = "yes"; then
+    echo "$my_host"
+fi
+
 if test "$echo_algorithms" = "yes"; then
     echo "Symmetric cipher algorithms: $symmetric_ciphers"
     echo "Public-key cipher algorithms: $asymmetric_ciphers"
diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4
index 0f60165..831dc0c 100644
--- a/src/libgcrypt.m4
+++ b/src/libgcrypt.m4
@@ -31,7 +31,7 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
      fi
   fi
 
-  AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
+  AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
   tmp=ifelse([$1], ,1:1.2.0,$1)
   if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
      req_libgcrypt_api=`echo "$tmp"     | sed 's/\(.*\):\(.*\)/\1/'`
@@ -98,6 +98,21 @@ AC_DEFUN([AM_PATH_LIBGCRYPT],
     LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
     LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
     ifelse([$2], , :, [$2])
+    if test x"$host" != x ; then
+      libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
+      if test x"$libgcrypt_config_host" != xnone ; then
+        if test x"$libgcrypt_config_host" != x"$host" ; then
+  AC_MSG_WARN([[
+***
+*** The config script $LIBGCRYPT_CONFIG was
+*** built for $libgcrypt_config_host and thus may not match the
+*** used host $host.
+*** You may want to use the configure option --with-libgcrypt-prefix
+*** to specify a matching config script.
+***]])
+        fi
+      fi
+    fi
   else
     LIBGCRYPT_CFLAGS=""
     LIBGCRYPT_LIBS=""

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

Summary of changes:
 ChangeLog               |    2 ++
 configure.ac            |    2 ++
 src/ChangeLog           |    6 ++++++
 src/libgcrypt-config.in |   14 +++++++++++++-
 src/libgcrypt.m4        |   17 ++++++++++++++++-
 5 files changed, 39 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
The GNU crypto library
http://git.gnupg.org




More information about the Gnupg-commits mailing list