From c2750130ca4f7860b39ddfb4ff8355e27a7f72bf Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 22 Jun 2019 12:40:04 -0400 Subject: configure.ac: Check shell for 64-bit arithmetic --- (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index c030ec2..113009a 100644 --- a/configure.ac +++ b/configure.ac @@ -34,7 +34,7 @@ AM_CONDITIONAL([IN_GIT], AC_ARG_WITH( [sh], [AS_HELP_STRING([--with-sh=PATH], - [POSIX-conformant shell with `local'])], + [POSIX-conformant shell with `local' and 64-bit arithmetic])], dnl This `dnl' is needed to workaround Vim syntax highlighting. [ case "${withval}" in @@ -57,6 +57,14 @@ AC_ARG_WITH( fi ] ) +AC_MSG_CHECKING([whether ${SH} supports 64-bit arithmetic]) +if test x"$(${SH} -c 'printf "%s\n" "$((2 << 61))"' 2>&AS_MESSAGE_LOG_FD)" = \ + x'4611686018427387904'; then + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) + AC_MSG_ERROR([a shell with 64-bit arithmetic is required]) +fi AC_ARG_WITH( [fakeroot], -- cgit v0.9.1