diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:38:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:38:56 +0000 |
commit | 6c20c8ed2cb9ab69a1a57ccb2b9b79969a808321 (patch) | |
tree | f63ce19d57fad3ac4a15bc26dbfbfa2b834111b5 /m4/strtoimax.m4 | |
parent | Initial commit. (diff) | |
download | bash-upstream.tar.xz bash-upstream.zip |
Adding upstream version 5.2.15.upstream/5.2.15upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | m4/strtoimax.m4 | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/m4/strtoimax.m4 b/m4/strtoimax.m4 new file mode 100644 index 0000000..3098572 --- /dev/null +++ b/m4/strtoimax.m4 @@ -0,0 +1,35 @@ +dnl Copyright (C) 2022 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Make sure we replace strtoimax if we don't have a declaration +dnl We can use this as a template for future function checks + +AC_DEFUN([BASH_FUNC_STRTOIMAX], [ +AC_MSG_CHECKING([for usable strtoimax]) +AC_CACHE_VAL(bash_cv_func_strtoimax, +[ + HAVE_STRTOIMAX=0 HAVE_DECL_STRTOIMAX=0 + + AC_CHECK_FUNCS([strtoimax]) + AC_CHECK_DECLS([strtoimax]) + + if test "$ac_cv_func_strtoimax" = "yes" ; then + HAVE_STRTOIMAX=1 + fi + if test "$ac_cv_have_decl_strtoimax" = "yes" ; then + HAVE_DECL_STRTOIMAX=1 + fi + + if test "$HAVE_STRTOIMAX" = 0 || test "$HAVE_DECL_STRTOIMAX" = 0 ; then + bash_cv_func_strtoimax=no REPLACE_STRTOIMAX=1 + else + bash_cv_func_strtoimax=yes + fi +]) +AC_MSG_RESULT($bash_cv_func_strtoimax) +if test $bash_cv_func_strtoimax = yes; then +AC_LIBOBJ(strtoimax) +fi +]) |