summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-06-22 12:40:04 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-06-22 12:43:49 (EDT)
commitc2750130ca4f7860b39ddfb4ff8355e27a7f72bf (patch)
tree8c4108cec3d7788bdbf3720b66292df5598eda3e
parent942a425651a5aaef73f422e2fb31ce4e114d551e (diff)
configure.ac: Check shell for 64-bit arithmetic
-rw-r--r--configure.ac10
1 files changed, 9 insertions, 1 deletions
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],