summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-08-11 12:40:14 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2018-05-26 08:35:18 +0200
commite8cc5a3daa0c7efde1c7b378e4093074a76ed962 (patch)
tree9ef0ec4eac92dbc41a0c875db961fb6e66cc57f3
parentf451823301c6af2f75f294c329ef47218cb50223 (diff)
downloadgnutls-tmp-gnutls_3_5_x-f26.tar.gz
tests: improved detection of 64-bit systemstmp-gnutls_3_5_x-f26
We now use the ${ac_cv_sizeof_unsigned_long_int} variable which gives the numbers used in the host system, not the build one. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r--configure.ac4
-rw-r--r--tests/cert-tests/Makefile.am1
-rwxr-xr-xtests/cert-tests/template-test5
3 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index cb33184661..798775b8d9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -768,6 +768,10 @@ if test x$ac_zlib != xno; then
fi
fi
AC_SUBST(LIBZ_PC)
+
+# export for use in scripts
+AC_SUBST(ac_cv_sizeof_unsigned_long_int)
+
AC_SUBST(GNUTLS_REQUIRES_PRIVATE)
diff --git a/tests/cert-tests/Makefile.am b/tests/cert-tests/Makefile.am
index f6addc2528..cacf765653 100644
--- a/tests/cert-tests/Makefile.am
+++ b/tests/cert-tests/Makefile.am
@@ -120,6 +120,7 @@ TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) \
VALGRIND="$(VALGRIND)" \
LIBTOOL="$(LIBTOOL)" \
top_builddir="$(top_builddir)" \
+ ac_cv_sizeof_unsigned_long_int="$(ac_cv_sizeof_unsigned_long_int)" \
ASAN_OPTIONS="detect_leaks=0:exitcode=6" \
srcdir="$(srcdir)"
diff --git a/tests/cert-tests/template-test b/tests/cert-tests/template-test
index 2f14bf2eab..206f8182b0 100755
--- a/tests/cert-tests/template-test
+++ b/tests/cert-tests/template-test
@@ -21,6 +21,7 @@
#set -e
srcdir="${srcdir:-.}"
+ac_cv_sizeof_unsigned_long_int="${ac_cv_sizeof_unsigned_long_int:-8}"
CERTTOOL="${CERTTOOL:-../../src/certtool${EXEEXT}}"
DIFF="${DIFF:-diff}"
@@ -121,7 +122,7 @@ fi
rm -f tmp-tt.pem
# The following test works in 64-bit systems
-if test "$(getconf LONG_BIT)" = "64"; then
+if test "${ac_cv_sizeof_unsigned_long_int}" = 8;then
datefudge -s "2007-04-22" \
"${CERTTOOL}" --generate-self-signed \
@@ -179,7 +180,7 @@ rm -f tmp-tt.pem
# Test the GeneralizedTime support
-if test "$(getconf LONG_BIT)" = "64"; then
+if test "${ac_cv_sizeof_unsigned_long_int}" = 8;then
# we should test that on systems which have 64-bit time_t.
datefudge -s "2051-04-22" \
"${CERTTOOL}" --generate-self-signed \