From b090081f4f710e05817dca625717b5b49ac87347 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Mon, 5 Apr 2010 13:46:23 -0700 Subject: [PATCH] configure: Change check for uint128_t Check for ability to divide uint128_t values, since that what we actually use it for (in gstutils.c). The existence of a uint128_t type doesn't mean the compiler can actually generate code for it. Also make sure that we can actually link the result successfully. Fixes bug #614767. --- configure.ac | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index b96d2dd629..3abbee31eb 100644 --- a/configure.ac +++ b/configure.ac @@ -320,12 +320,14 @@ dnl *** checks for structures *** dnl *** checks for compiler characteristics *** dnl check if the compiler supports __uint128_t (gcc) +dnl Actually check for 128-bit division, since that's what we use +dnl uint128_t for. AC_CACHE_CHECK(for __uint128_t, gst_cv_uint128_t, - AC_TRY_COMPILE([ ], [ - unsigned long long v1 = 1024ULL; - unsigned long long v2 = 0x8000000000000000ULL; - __uint128_t u = ((__uint128_t)v1)*((__uint128_t)v2); - + AC_TRY_LINK([ ], [ + static __uint128_t v1 = 100; + static __uint128_t v2 = 10; + static __uint128_t u; + u = v1 / v2; return 0; ], [ gst_cv_uint128_t=yes