# Checks for header files.
-AC_CHECK_HEADERS([locale.h])
-AC_CHECK_HEADERS(sys/select.h)
-AC_CHECK_HEADERS([sys/uio.h])
+AC_CHECK_HEADERS_ONCE([locale.h sys/select.h sys/uio.h argp.h
+ unistd.h sys/time.h sys/types.h sys/stat.h])
# Type checks.
# Replacement functions.
AC_REPLACE_FUNCS(stpcpy)
-# Check for unistd.h for setenv replacement function.
-AC_CHECK_HEADERS([unistd.h sys/time.h sys/types.h sys/stat.h])
AC_REPLACE_FUNCS(setenv)
# Assuan check for descriptor passing.
# 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_REVISION}"
+ BUILD_FILEVERSION="${BUILD_FILEVERSION}${BUILD_NUMBER}"
fi
-AC_SUBST(BUILD_REVISION)
+AC_SUBST(BUILD_NUMBER)
AC_SUBST(BUILD_TIMESTAMP)
AC_SUBST(BUILD_FILEVERSION)
AC_SUBST(LTLIBOBJS)
# Some checks for gpgme-tool
-AC_CHECK_HEADER([argp.h])
+# Done at top: AC_CHECK_HEADER([argp.h])
AC_CHECK_TYPES([error_t], [],
[AC_DEFINE([error_t], [int],
[Define to a type to use for `error_t' if it is not otherwise available.])],