2007-08-10 Marcus Brinkmann <marcus@g10code.de>
authorMarcus Brinkmann <mb@g10code.com>
Thu, 9 Aug 2007 22:57:36 +0000 (22:57 +0000)
committerMarcus Brinkmann <mb@g10code.com>
Thu, 9 Aug 2007 22:57:36 +0000 (22:57 +0000)
* m4/gpg4win.m4: Check for duplicate packages.

ChangeLog
m4/gpg4win.m4

index 729030a..4124c8d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-08-10  Marcus Brinkmann  <marcus@g10code.de>
+
+       * m4/gpg4win.m4: Check for duplicate packages.
+
 2007-08-06  Werner Koch  <wk@g10code.com>
 
        * src/gpgwrap.c (build_commandline): Terminate each itenm in the
index 2c11ddd..55106a4 100644 (file)
@@ -147,6 +147,15 @@ AC_DEFUN([GPG4WIN_FIND],
         AC_MSG_RESULT($_gpg4win_file))
   AS_IF([test -z "$_gpg4win_file" -a $_gpg4win_critical = yes],
         AC_MSG_ERROR(could not find sources for $1 in $_gpg4win_dir))
+
+  # Test for duplicate.
+  _gpg4win_found=
+  for _gpg4win_f in $_gpg4win_file; do
+      AS_IF([test "$_gpg4win_found" = yes],
+            AC_MSG_ERROR(found more than one sources for $1 in $_gpg4win_dir))
+      _gpg4win_found=yes
+  done
+
   AS_IF([test ! -z "$_gpg4win_file"],
         [gpg4win_val="$_gpg4win_file"
        [gpg4win_version=`echo "$gpg4win_val" | sed -e "s,^.*/${_gpg4win_pat}${_gpg4win_suffix}$,\1,"`]