summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-03-07 14:13:33 +0100
committerWerner Koch <wk@gnupg.org>2013-03-07 14:13:33 +0100
commitc620099e4ab2f35e0196b395a805bb655c984ac2 (patch)
treeb6ff6f267a3aa795f210d6104bbaa9dec1b1c0a6 /acinclude.m4
parent70dcac663de06b012417015c175973d64e6980df (diff)
downloadlibgcrypt-c620099e4ab2f35e0196b395a805bb655c984ac2.tar.gz
Pretty print the configure feedback.
* acinclude.m4 (GNUPG_MSG_PRINT): Remove. (GCRY_MSG_SHOW, GCRY_MSG_WRAP): New. * configure.ac: Use new macros for the feedback.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m439
1 files changed, 35 insertions, 4 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index e69291af..fdb2d17a 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1,6 +1,7 @@
dnl macros to configure Libgcrypt
dnl Copyright (C) 1998, 1999, 2000, 2001, 2002,
dnl 2003 Free Software Foundation, Inc.
+dnl Copyright (C) 2013 g10 Code GmbH
dnl
dnl This file is part of Libgcrypt.
dnl
@@ -18,13 +19,43 @@ dnl You should have received a copy of the GNU Lesser General Public
dnl License along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-dnl GNUPG_MSG_PRINT(STRING)
-dnl print a message
+dnl GCRY_MSG_SHOW(PREFIX,STRING)
+dnl Print a message with a prefix.
dnl
-define([GNUPG_MSG_PRINT],
- [ echo $ac_n "$1"" $ac_c" 1>&AS_MESSAGE_FD([])
+define([GCRY_MSG_SHOW],
+ [
+ echo " $1 $2" 1>&AS_MESSAGE_FD([])
+ ])
+
+dnl GCRY_MSG_WRAP(PREFIX, ALGOLIST)
+dnl Print a nicely formatted list of algorithms
+dnl with an approriate line wrap.
+dnl
+define([GCRY_MSG_WRAP],
+ [
+ tmp=" $1"
+ tmpi="abc"
+ if test "${#tmpi}" -ne 3 >/dev/null 2>&1 ; then
+ dnl Without a POSIX shell, we don't botter to wrap it
+ echo "$tmp $2" 1>&AS_MESSAGE_FD([])
+ else
+ tmpi=`echo "$tmp"| sed 's/./ /g'`
+ echo $2 EOF | tr ' ' '\n' | \
+ while read word; do
+ if test "${#tmp}" -gt 70 ; then
+ echo "$tmp" 1>&AS_MESSAGE_FD([])
+ tmp="$tmpi"
+ fi
+ if test "$word" = "EOF" ; then
+ echo "$tmp" 1>&AS_MESSAGE_FD([])
+ else
+ tmp="$tmp $word"
+ fi
+ done
+ fi
])
+
dnl GNUPG_CHECK_TYPEDEF(TYPE, HAVE_NAME)
dnl Check whether a typedef exists and create a #define $2 if it exists
dnl