From 2a7b21ac7227b4c4bb662ca9d0781b20dca5c2be Mon Sep 17 00:00:00 2001 From: David Shaw Date: Wed, 27 Aug 2008 17:01:29 +0000 Subject: [PATCH] * configure.ac: Use printf for the most portable SVN version detection. --- ChangeLog | 3 +++ configure.ac | 7 ++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6a2bf62c1..973a359af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-08-27 David Shaw + * configure.ac: Use printf for the most portable SVN version + detection. + * configure.ac: Darwin's /bin/sh has a builtin echo that doesn't understand '-n'. Use tr to trim the carriage return instead. diff --git a/configure.ac b/configure.ac index e9332a5b6..5884514b0 100644 --- a/configure.ac +++ b/configure.ac @@ -26,11 +26,8 @@ min_automake_version="1.10" # "svn up" and "autogen.sh" right before creating a distribution. m4_define([my_version], [2.0.10]) m4_define([my_issvn], [yes]) - - -m4_define([svn_revision], m4_esyscmd([echo $((svn info 2>/dev/null \ - || echo 'Revision: 0')|sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)| \ - tr -d '\n'])) +m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \ + | sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)])) AC_INIT([gnupg], [my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision])], [bug-gnupg@gnupg.org])