summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-06-22 12:50:15 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-06-22 12:50:15 (EDT)
commit1d1fe814c9a46905bdf996af34c0ff81bf6f8d22 (patch)
tree27dcb7863c735c0d97298eda62cbb8e8e040deed
parentc2750130ca4f7860b39ddfb4ff8355e27a7f72bf (diff)
configure.ac: Check shell for local
-rw-r--r--NEWS5
-rw-r--r--configure.ac8
2 files changed, 13 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 64453df..d983b9c 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,11 @@ Utilities:
* opkbuild now supports commands with arguments as arguments to the
"-r" option, for example "-r 'env -i fakeroot'".
+Build system:
+
+ * configure now checks the shell for support for the "local" keyword
+ and 64-bit arithmetic.
+
opkbuild version 4.1.1
----------------------
diff --git a/configure.ac b/configure.ac
index 113009a..f6e438f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,6 +57,14 @@ AC_ARG_WITH(
fi
]
)
+AC_MSG_CHECKING([whether ${SH} supports \`local'])
+if test x"$(${SH} -c 'f() { local v=2; }; v=1; f; printf "%d\n" "${v}";' \
+ 2>&AS_MESSAGE_LOG_FD)" = x'1'; then
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([a shell with \`local' is required])
+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