Release 1.4.3.
[gpgme.git] / configure.ac
index 174f406..92375e6 100644 (file)
 AC_PREREQ(2.59)
 min_automake_version="1.11"
 
-# Version number: Remember to change it immediately *after* a release.
-#                 Make sure to run  "svn up" and "./autogen.sh --force"
-#                 before a "make dist".  See below for the LT versions.
-#                 Never do a binary build with the same version number
-#                 in another year; this would mess up the build number.
-#
-# The GIT version is usually the next intended release version with
-# the string "-gitNNNNNN" appended.  The reason for this is that tests
-# for a specific feature can already be done under the assumption that
-# the GIT version is the most recent one in a branch.  To disable the
-# GIT version for the real release, set the my_isgit macro to no.
-m4_define(my_version_major, [1])
-m4_define(my_version_minor, [4])
-m4_define(my_version_micro, [0])
-m4_define(my_isgit, [yes])
-
-m4_define(my_version, [my_version_major.my_version_minor.my_version_micro])
-m4_define([svn_revision], m4_esyscmd([printf "%d" $( (svn info 2>/dev/null \
-            || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')]))
-m4_define([git_revision],
+# To build a release you need to create a tag with the version number
+# (git tag -s gpgme-n.m.k) and run "./autogen.sh --force".  Please
+# bump the version number immediately after the release and do another
+# commit and push so that the git magic is able to work.  See below
+# for the LT versions.
+m4_define(mym4_version_major, [1])
+m4_define(mym4_version_minor, [4])
+m4_define(mym4_version_micro, [3])
+
+# Below is m4 magic to extract and compute the revision number, the
+# decimalized short revision number, a beta version string, and a flag
+# indicating a development version (mym4_isgit). Note that the m4
+# processing is done by autoconf and not during the configure run.
+m4_define(mym4_version,
+          [mym4_version_major.mym4_version_minor.mym4_version_micro])
+m4_define([mym4_revision],
           m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r']))
-m4_define([my_full_version], [my_version[]m4_if(my_isgit,[yes],
-          [m4_if(git_revision,[],[-svn[]svn_revision],[-git[]git_revision])])])
+m4_define([mym4_revision_dec],
+          m4_esyscmd_s([echo $((0x$(echo ]mym4_revision[|head -c 4)))]))
+m4_define([mym4_betastring],
+          m4_esyscmd_s([git describe --match 'gpgme-[0-9].*[0-9]' --long|\
+                        awk -F- '$3!=0{print"-beta"$3}']))
+m4_define([mym4_isgit],m4_if(mym4_betastring,[],[no],[yes]))
+m4_define([mym4_full_version],[mym4_version[]mym4_betastring])
 
-AC_INIT([gpgme],[my_full_version],[http://bugs.gnupg.org])
+AC_INIT([gpgme],[mym4_full_version],[http://bugs.gnupg.org])
 
 # LT Version numbers, remember to change them just *before* a release.
 #   (Code changed:                     REVISION++)
@@ -54,23 +55,21 @@ AC_INIT([gpgme],[my_full_version],[http://bugs.gnupg.org])
 #   (Interfaces added:                 AGE++)
 #   (Interfaces removed/changed:       AGE=0)
 #
-LIBGPGME_LT_CURRENT=19
+LIBGPGME_LT_CURRENT=22
 # Subtract 2 from this value if you want to make the LFS transition an
 # ABI break.  [Note to self: Remove this comment with the next regular break.]
-LIBGPGME_LT_AGE=8
-LIBGPGME_LT_REVISION=1
+LIBGPGME_LT_AGE=11
+LIBGPGME_LT_REVISION=0
 
 # If the API is changed in an incompatible way: increment the next counter.
 GPGME_CONFIG_API_VERSION=1
 ##############################################
 
+NEED_GPG_ERROR_VERSION=1.8
 NEED_LIBASSUAN_API=2
 NEED_LIBASSUAN_VERSION=2.0.2
 
-m4_define([git_brevis],m4_esyscmd(printf "%u" 0x[]m4_substr(git_revision,0,4)))
-BUILD_REVISION=m4_if(git_revision,[],[svn_revision],[git_brevis])
-VERSION_NUMBER=m4_esyscmd(printf "0x%02x%02x%02x" \
-                          my_version_major my_version_minor my_version_micro)
+
 PACKAGE=$PACKAGE_NAME
 VERSION=$PACKAGE_VERSION
 
@@ -78,6 +77,8 @@ AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_SRCDIR(src/gpgme.h.in)
 AC_CONFIG_HEADER(config.h)
+# Note: For automake 1.13 add the option
+#          serial-tests
 AM_INIT_AUTOMAKE
 AM_MAINTAINER_MODE
 AC_CANONICAL_HOST
@@ -106,9 +107,11 @@ AC_SUBST(LIBGPGME_LT_REVISION)
 
 AC_SUBST(PACKAGE)
 AC_SUBST(VERSION)
-AC_SUBST(VERSION_NUMBER)
 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package])
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
+VERSION_NUMBER=m4_esyscmd(printf "0x%02x%02x%02x" mym4_version_major \
+                          mym4_version_minor mym4_version_micro)
+AC_SUBST(VERSION_NUMBER)
 
 # Don't default to build static libs.
 LT_PREREQ([2.2.6])
@@ -232,6 +235,27 @@ AM_CONDITIONAL(BUILD_W32_QT, test "$build_w32_qt" = yes)
 AM_CONDITIONAL(HAVE_PTHREAD, test "$have_pthread" = "yes")
 
 
+#
+# Provide information about the build.
+#
+BUILD_REVISION="mym4_revision"
+AC_SUBST(BUILD_REVISION)
+AC_DEFINE_UNQUOTED(BUILD_REVISION, "$BUILD_REVISION",
+                   [GIT commit id revision used to build this package])
+
+changequote(,)dnl
+BUILD_FILEVERSION=`echo "$PACKAGE_VERSION"|sed 's/\([0-9.]*\).*/\1./;s/\./,/g'`
+changequote([,])dnl
+BUILD_FILEVERSION="${BUILD_FILEVERSION}mym4_revision_dec"
+AC_SUBST(BUILD_FILEVERSION)
+
+BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date`
+AC_SUBST(BUILD_TIMESTAMP)
+AC_DEFINE_UNQUOTED(BUILD_TIMESTAMP, "$BUILD_TIMESTAMP",
+                   [The time this package was configured for a build])
+
+
+
 
 # Checks for header files.
 AC_CHECK_HEADERS_ONCE([locale.h sys/select.h sys/uio.h argp.h
@@ -248,31 +272,43 @@ AC_TYPE_UINTPTR_T
 # A simple compile time check in gpgme.h for GNU/Linux systems that
 # prevents a file offset bits mismatch between gpgme and the application.
 NEED__FILE_OFFSET_BITS=0
-case "$ac_cv_sys_file_offset_bits" in
-  "" | no | unknown) ;;
-  *)
-  NEED__FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits
-  ;;
-esac
+if test "$have_w32_system" != yes; then
+  case "$ac_cv_sys_file_offset_bits" in
+    "" | no | unknown) ;;
+    *)
+    NEED__FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits
+    ;;
+  esac
+fi
 AC_SUBST(NEED__FILE_OFFSET_BITS)
 
 # Figure out platform dependent typedefs for gpgme.h
 if test "$have_w32_system" = yes; then
-   if test "$have_w64_system" = yes; then
-      INSERT__TYPEDEFS_FOR_GPGME_H="/* Typedefs for the 64 bit W32 API.  */
-#include <basetsd.h>
-typedef long off_t;
-typedef __int64 ssize_t;"
-   else
-      INSERT__TYPEDEFS_FOR_GPGME_H="/* Typedefs for the 32 bit W32 API.  */
-typedef long off_t;
-typedef long ssize_t;"
-   fi
+    INSERT__TYPEDEFS_FOR_GPGME_H="
+#ifdef _WIN64
+# include <stdint.h>
+  typedef int64_t gpgme_off_t;
+  typedef int64_t gpgme_ssize_t;
+#else /* _WIN32 */
+  typedef long gpgme_off_t;
+  typedef long gpgme_ssize_t;
+#endif /* _WIN32 */"
+    API__OFF_T="gpgme_off_t"
+    API__SSIZE_T="gpgme_ssize_t"
 else
-   INSERT__TYPEDEFS_FOR_GPGME_H="#include <sys/types.h>"
+    INSERT__TYPEDEFS_FOR_GPGME_H="
+#include <sys/types.h>
+typedef off_t   gpgme_off_t;
+typedef ssize_t gpgme_ssize_t;"
+    API__OFF_T="off_t"
+    API__SSIZE_T="ssize_t"
 fi
 AC_SUBST(INSERT__TYPEDEFS_FOR_GPGME_H)
 AM_SUBST_NOTMAKE(INSERT__TYPEDEFS_FOR_GPGME_H)
+AC_SUBST(API__OFF_T)
+AM_SUBST_NOTMAKE(API__OFF_T)
+AC_SUBST(API__SSIZE_T)
+AM_SUBST_NOTMAKE(API__SSIZE_T)
 
 # Checks for compiler features.
 if test "$GCC" = yes; then
@@ -294,6 +330,8 @@ fi
 
 
 # Checks for library functions.
+AC_MSG_NOTICE([checking for libraries])
+
 AC_FUNC_FSEEKO
 
 AC_REPLACE_FUNCS(vasprintf)
@@ -342,7 +380,9 @@ fi
 AC_CHECK_FUNCS(setlocale)
 
 # Checking for libgpg-error.
-AM_PATH_GPG_ERROR(1.8,, AC_MSG_ERROR([libgpg-error was not found]))
+have_gpg_error=no
+AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
+                  have_gpg_error=yes, have_gpg_error=no)
 AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GPGME,
           [The default error source for GPGME.])
 
@@ -405,16 +445,121 @@ if test "$NEED_G13_VERSION" = "no"; then
   NEED_G13_VERSION=0.0.0
 fi
 
+AC_DEFINE_UNQUOTED(NEED_GPGCONF_VERSION, "$NEED_GPGCONF_VERSION",
+                                        [Min. needed GPGCONF version.])
 AC_DEFINE_UNQUOTED(NEED_GPG_VERSION, "$NEED_GPG_VERSION",
                                     [Min. needed GnuPG version.])
 AC_DEFINE_UNQUOTED(NEED_GPGSM_VERSION, "$NEED_GPGSM_VERSION",
                                       [Min. needed GPGSM version.])
-AC_DEFINE_UNQUOTED(NEED_GPGCONF_VERSION, "$NEED_GPGCONF_VERSION",
-                                        [Min. needed GPGCONF version.])
 AC_DEFINE_UNQUOTED(NEED_G13_VERSION, "$NEED_G13_VERSION",
                                     [Min. needed G13 version.])
 
+#
+# Check for GPGCONF
+#
+gpgconf_usable_for_test=no
+NO_OVERRIDE=no
+AC_ARG_WITH(gpgconf,
+           AC_HELP_STRING([--with-gpgconf=PATH],
+                           [use gpgconf binary at PATH]),
+           GPGCONF=$withval, NO_OVERRIDE=yes)
+if test "$NO_OVERRIDE" = "yes" || test "$GPGCONF" = "yes"; then
+  GPGCONF=
+  NO_OVERRIDE=yes
+  if test "$cross_compiling" != "yes"; then
+    AC_PATH_PROG(GPGCONF, gpgconf)
+  fi
+  if test -z "$GPGCONF"; then
+    GPGCONF="$GPGCONF_DEFAULT"
+  fi
+fi
+if test "$GPGCONF" = no; then
+  if test "$NO_OVERRIDE" = "yes"; then
+    if test "$cross_compiling" != "yes"; then
+      AC_MSG_WARN([
+***
+*** Could not find gpgconf, install gpgconf or use --with-gpgconf=PATH to enable it
+***])
+    else
+      AC_MSG_ERROR([
+***
+*** Can not determine path to gpgconf when cross-compiling, use --with-gpgconf=PATH
+***])
+    fi
+  fi
+else
+  AC_DEFINE_UNQUOTED(GPGCONF_PATH, "$GPGCONF", [Path to the GPGCONF binary.])
+  AC_DEFINE(ENABLE_GPGCONF,1,[Whether GPGCONF support is enabled])
+fi
+AM_CONDITIONAL(HAVE_GPGCONF, test "$GPGCONF" != "no")
 
+dnl Check for GPGCONF version requirement.
+GPGCONF_VERSION=unknown
+ok=maybe
+if test -z "$GPGCONF" -o "x$GPGCONF" = "xno"; then
+  ok=no
+else
+  if test "$cross_compiling" = "yes"; then
+    AC_MSG_WARN([GPGCONF version can not be checked when cross compiling])
+    ok=no
+  else
+    if test ! -x "$GPGCONF"; then
+      AC_MSG_WARN([GPGCONF not executable, version check disabled])
+      ok=no
+    fi
+  fi
+fi
+if test "$ok" = "maybe"; then
+  AC_MSG_CHECKING(for GPGCONF >= $NEED_GPGCONF_VERSION)
+  req_major=`echo $NEED_GPGCONF_VERSION | \
+             sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+  req_minor=`echo $NEED_GPGCONF_VERSION | \
+            sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+  req_micro=`echo $NEED_GPGCONF_VERSION | \
+            sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+  GPGCONF_VERSION=`$GPGCONF --version | sed -n '1 s/[[^0-9]]*\(.*\)/\1/p'`
+  major=`echo $GPGCONF_VERSION | \
+        sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+  minor=`echo $GPGCONF_VERSION | \
+        sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
+  micro=`echo $GPGCONF_VERSION | \
+        sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
+
+  if test "$major" -gt "$req_major"; then
+    ok=yes
+  else
+    if test "$major" -eq "$req_major"; then
+      if test "$minor" -gt "$req_minor"; then
+        ok=yes
+      else
+        if test "$minor" -eq "$req_minor"; then
+          if test "$micro" -ge "$req_micro"; then
+            ok=yes
+         fi
+        fi
+      fi
+    fi
+  fi
+  if test "$ok" = "yes"; then
+    AC_MSG_RESULT(yes)
+    if test "$cross_compiling" != "yes"; then
+       gpgconf_usable_for_test=yes
+    fi
+  else
+    AC_MSG_RESULT(no)
+    AC_MSG_WARN([GPGCONF must be at least version $NEED_GPGCONF_VERSION])
+  fi
+fi
+run_gpgconf_test="$ok"
+AC_ARG_ENABLE(gpgconf-test,
+  AC_HELP_STRING([--disable-gpgconf-test], [disable GPGCONF run test]),
+         run_gpgconf_test=$enableval)
+AM_CONDITIONAL(RUN_GPGCONF_TESTS, test "$run_gpgconf_test" = "yes")
+
+
+#
+# Check for GPG
+#
 NO_OVERRIDE=no
 AC_ARG_WITH(gpg,
            AC_HELP_STRING([--with-gpg=PATH], [use GnuPG binary at PATH]),
@@ -423,7 +568,11 @@ if test "$NO_OVERRIDE" = "yes" || test "$GPG" = "yes"; then
   GPG=
   NO_OVERRIDE=yes
   if test "$cross_compiling" != "yes"; then
-    AC_PATH_PROG(GPG, gpg)
+    if test "$gpgconf_usable_for_test" = "yes"; then
+      GPG="`$GPGCONF --list-components | grep ^gpg: | cut -d: -f 3`"
+    else
+      AC_PATH_PROG(GPG, gpg)
+    fi
   fi
   if test -z "$GPG"; then
     GPG="$GPG_DEFAULT"
@@ -508,6 +657,10 @@ AC_ARG_ENABLE(gpg-test,
 AM_CONDITIONAL(RUN_GPG_TESTS, test "$run_gpg_test" = "yes")
 AC_SUBST(GPG_PATH)
 
+
+#
+# Check for GPGSM
+#
 NO_OVERRIDE=no
 AC_ARG_WITH(gpgsm,
            AC_HELP_STRING([--with-gpgsm=PATH], [use GpgSM binary at PATH]),
@@ -516,7 +669,11 @@ if test "$NO_OVERRIDE" = "yes" || test "$GPGSM" = "yes"; then
   GPGSM=
   NO_OVERRIDE=yes
   if test "$cross_compiling" != "yes"; then
-    AC_PATH_PROG(GPGSM, gpgsm)
+    if test "$gpgconf_usable_for_test" = "yes"; then
+      GPGSM="`$GPGCONF --list-components | grep ^gpgsm: | cut -d: -f 3`"
+    else
+      AC_PATH_PROG(GPGSM, gpgsm)
+    fi
   fi
   if test -z "$GPGSM"; then
     GPGSM="$GPGSM_DEFAULT"
@@ -604,102 +761,9 @@ AC_ARG_ENABLE(gpgsm-test,
 AM_CONDITIONAL(RUN_GPGSM_TESTS, test "$run_gpgsm_test" = "yes")
 
 
-NO_OVERRIDE=no
-AC_ARG_WITH(gpgconf,
-           AC_HELP_STRING([--with-gpgconf=PATH],
-                           [use gpgconf binary at PATH]),
-           GPGCONF=$withval, NO_OVERRIDE=yes)
-if test "$NO_OVERRIDE" = "yes" || test "$GPGCONF" = "yes"; then
-  GPGCONF=
-  NO_OVERRIDE=yes
-  if test "$cross_compiling" != "yes"; then
-    AC_PATH_PROG(GPGCONF, gpgconf)
-  fi
-  if test -z "$GPGCONF"; then
-    GPGCONF="$GPGCONF_DEFAULT"
-  fi
-fi
-if test "$GPGCONF" = no; then
-  if test "$NO_OVERRIDE" = "yes"; then
-    if test "$cross_compiling" != "yes"; then
-      AC_MSG_WARN([
-***
-*** Could not find gpgconf, install gpgconf or use --with-gpgconf=PATH to enable it
-***])
-    else
-      AC_MSG_ERROR([
-***
-*** Can not determine path to gpgconf when cross-compiling, use --with-gpgconf=PATH
-***])
-    fi
-  fi
-else
-  AC_DEFINE_UNQUOTED(GPGCONF_PATH, "$GPGCONF", [Path to the GPGCONF binary.])
-  AC_DEFINE(ENABLE_GPGCONF,1,[Whether GPGCONF support is enabled])
-fi
-AM_CONDITIONAL(HAVE_GPGCONF, test "$GPGCONF" != "no")
-
-dnl Check for GPGCONF version requirement.
-GPGCONF_VERSION=unknown
-ok=maybe
-if test -z "$GPGCONF" -o "x$GPGCONF" = "xno"; then
-  ok=no
-else
-  if test "$cross_compiling" = "yes"; then
-    AC_MSG_WARN([GPGCONF version can not be checked when cross compiling])
-    ok=no
-  else
-    if test ! -x "$GPGCONF"; then
-      AC_MSG_WARN([GPGCONF not executable, version check disabled])
-      ok=no
-    fi
-  fi
-fi
-if test "$ok" = "maybe"; then
-  AC_MSG_CHECKING(for GPGCONF >= $NEED_GPGCONF_VERSION)
-  req_major=`echo $NEED_GPGCONF_VERSION | \
-             sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
-  req_minor=`echo $NEED_GPGCONF_VERSION | \
-            sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
-  req_micro=`echo $NEED_GPGCONF_VERSION | \
-            sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
-  GPGCONF_VERSION=`$GPGCONF --version | sed -n '1 s/[[^0-9]]*\(.*\)/\1/p'`
-  major=`echo $GPGCONF_VERSION | \
-        sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
-  minor=`echo $GPGCONF_VERSION | \
-        sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
-  micro=`echo $GPGCONF_VERSION | \
-        sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
-
-  if test "$major" -gt "$req_major"; then
-    ok=yes
-  else
-    if test "$major" -eq "$req_major"; then
-      if test "$minor" -gt "$req_minor"; then
-        ok=yes
-      else
-        if test "$minor" -eq "$req_minor"; then
-          if test "$micro" -ge "$req_micro"; then
-            ok=yes
-         fi
-        fi
-      fi
-    fi
-  fi
-  if test "$ok" = "yes"; then
-    AC_MSG_RESULT(yes)
-  else
-    AC_MSG_RESULT(no)
-    AC_MSG_WARN([GPGCONF must be at least version $NEED_GPGCONF_VERSION])
-  fi
-fi
-run_gpgconf_test="$ok"
-AC_ARG_ENABLE(gpgconf-test,
-  AC_HELP_STRING([--disable-gpgconf-test], [disable GPGCONF run test]),
-         run_gpgconf_test=$enableval)
-AM_CONDITIONAL(RUN_GPGCONF_TESTS, test "$run_gpgconf_test" = "yes")
-
-
+#
+# Check for G13
+#
 NO_OVERRIDE=no
 AC_ARG_WITH(g13,
            AC_HELP_STRING([--with-g13=PATH],
@@ -709,7 +773,15 @@ if test "$NO_OVERRIDE" = "yes" || test "$G13" = "yes"; then
   G13=
   NO_OVERRIDE=yes
   if test "$cross_compiling" != "yes"; then
-    AC_PATH_PROG(G13, g13)
+    if test "$gpgconf_usable_for_test" = "yes"; then
+      G13="`$GPGCONF --list-components | grep ^g13: | cut -d: -f 3`"
+      if test -z "$G13"; then
+        # Use a hack if gpgconf has no support for g13.
+        G13="`$GPGCONF --list-dirs | grep ^bindir: | cut -d: -f 2`/g13"
+      fi
+    else
+      AC_PATH_PROG(G13, g13)
+    fi
   fi
   if test -z "$G13"; then
     G13="$G13_DEFAULT"
@@ -796,6 +868,10 @@ AC_ARG_ENABLE(g13-test,
 AM_CONDITIONAL(RUN_G13_TESTS, test "$run_g13_test" = "yes")
 
 
+#
+# Other checks
+#
+
 # Check for funopen
 AC_CHECK_FUNCS(funopen)
 if test $ac_cv_func_funopen != yes; then
@@ -840,9 +916,20 @@ AC_CHECK_MEMBER(struct cmsghdr.cmsg_len,
 #include <unistd.h>
        ])
 
-use_descriptor_passing=no
+
+dnl There seems to be a problem with Apple and decriptor passing.
+dnl Until we found a solution we change the default to no.
+dnl See bug 1483.
+case "${host}" in
+    *-apple-darwin*)
+      use_descriptor_passing=no
+      ;;
+    *)
+      use_descriptor_passing=yes
+      ;;
+esac
 AC_ARG_ENABLE(fd-passing,
-  AC_HELP_STRING([--enable-fd-passing], [use FD passing if supported]),
+  AC_HELP_STRING([--disable-fd-passing], [do not use FD passing]),
   use_descriptor_passing=$enableval)
 
 if test "$supports_descriptor_passing" != "yes"; then
@@ -868,31 +955,18 @@ fi
 AM_CONDITIONAL(HAVE_UISERVER, test "$uiserver" != "no")
 
 
-# Generate values for the DLL version info
-
-dnl Windows uses an internal build number.  We use the last day of the
-dnl year concatenated with the hour for it.  WARNING: You should not
-dnl do a build with the same version number in another year.
-if test "$have_w32_system" = yes; then
-    BUILD_TIMESTAMP=`date --iso-8601=minutes`
-    BUILD_NUMBER="$(date -u '+%j%H' | sed 's/^0*\(.*\)/\1/')"
-    changequote(,)dnl
-    BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./;s/\./,/g'`
-    changequote([,])dnl
-    BUILD_FILEVERSION="${BUILD_FILEVERSION}${BUILD_NUMBER}"
-fi
-AC_SUBST(BUILD_NUMBER)
-AC_SUBST(BUILD_TIMESTAMP)
-AC_SUBST(BUILD_FILEVERSION)
-
 # Add a few constants to help porting to W32
 AH_VERBATIM([SEPCONSTANTS],
 [
-/* Separators as used in $PATH.  */
+/* Separators as used in $PATH and file name.  */
 #ifdef HAVE_DOSISH_SYSTEM
 #define PATHSEP_C ';'
+#define DIRSEP_C '\\'
+#define DIRSEP_S "\\"
 #else
 #define PATHSEP_C ':'
+#define DIRSEP_C '/'
+#define DIRSEP_S "/"
 #endif
 ])
 
@@ -906,6 +980,9 @@ AH_BOTTOM([
 
 /* Under WindowsCE we need gpg-error's strerror macro.  */
 #define GPG_ERR_ENABLE_ERRNO_MACROS 1
+
+#define CRIGHTBLURB "Copyright (C) 2000 Werner Koch\n" \
+                    "Copyright (C) 2001--2013 g10 Code GmbH\n"
 ])
 
 
@@ -939,6 +1016,16 @@ AC_SUBST(emacs_local_vars_end, ['End:'])
 
 # Last check.
 die=no
+if test "$have_gpg_error" = "no"; then
+   die=yes
+   AC_MSG_NOTICE([[
+***
+*** You need libgpg-error to build this program.
+**  This library is for example available at
+***   ftp://ftp.gnupg.org/gcrypt/libgpg-error
+*** (at least version $NEED_GPG_ERROR_VERSION is required.)
+***]])
+fi
 if test "$have_libassuan" = "no"; then
    die=yes
    AC_MSG_NOTICE([[
@@ -977,19 +1064,19 @@ AC_OUTPUT
 echo "
         GPGME v${VERSION} has been configured as follows:
 
-        Revision:        git_revision  (git_brevis)
+        Revision:        mym4_revision  (mym4_revision_dec)
         Platform:        $host
 
-        GnuPG path:      $GPG
-        GnuPG version:   $GPG_VERSION, min. $NEED_GPG_VERSION
-        GpgSM path:      $GPGSM
-        GpgSM version:   $GPGSM_VERSION, min. $NEED_GPGSM_VERSION
-        GpgConf path:    $GPGCONF
-        GpgConf version: $GPGCONF_VERSION, min. $NEED_GPGCONF_VERSION
-        G13 path:        $G13
+        Gpgconf at:      $GPGCONF
+        Gpgconf version: $GPGCONF_VERSION, min. $NEED_GPGCONF_VERSION
+        GPG at:          $GPG
+        GPG version:     $GPG_VERSION, min. $NEED_GPG_VERSION
+        Gpgsm at:        $GPGSM
+        Gpgsm version:   $GPGSM_VERSION, min. $NEED_GPGSM_VERSION
+        G13 at:          $G13
         G13 version:     $G13_VERSION, min. $NEED_G13_VERSION
 
-        Assuan version:  $libassuan_version, min. $NEED_LIBASSUAN_VERSION
+        Assuan version:  $libassuan_config_version, min. $NEED_LIBASSUAN_VERSION
 
         UI Server:       $uiserver
         FD Passing:      $use_descriptor_passing