Actually check for uint64_t.
authorWerner Koch <wk@gnupg.org>
Thu, 9 Jan 2014 18:14:09 +0000 (19:14 +0100)
committerWerner Koch <wk@gnupg.org>
Fri, 17 Jan 2014 09:07:52 +0000 (10:07 +0100)
* configure.ac: Check size of uint64_t and the UINT64_C macro.
--

configure.ac used $ac_cv_sizeof_uint64_t but never set this variable.
Due to the availability of long long on all platforms supporting
uint64_t this was not a real problem.  Found while remove the
corresponding test from gnupg.

Signed-off-by: Werner Koch <wk@gnupg.org>
configure.ac

index 6272871..c3ab96f 100644 (file)
@@ -350,6 +350,15 @@ if test "$ac_cv_sizeof_unsigned_short" = "0" \
     AC_MSG_WARN([Hmmm, something is wrong with the sizes - using defaults]);
 fi
 
+# Ensure that we have UINT64_C before we bother to check for uint64_t
+AC_CACHE_CHECK([for UINT64_C],[gnupg_cv_uint64_c_works],
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <inttypes.h>]],
+       [[uint64_t foo=UINT64_C(42);]])],
+     gnupg_cv_uint64_c_works=yes,gnupg_cv_uint64_c_works=no))
+if test "$gnupg_cv_uint64_c_works" = "yes" ; then
+   AC_CHECK_SIZEOF(uint64_t)
+fi
+
 # Do we have any 64-bit data types?
 if test "$ac_cv_sizeof_unsigned_int" != "8" \
    && test "$ac_cv_sizeof_unsigned_long" != "8" \