--- m4/strtoimax.m4.orig	2023-07-25 04:28:08.199688564 +0000
+++ m4/strtoimax.m4	2023-07-25 04:28:43.547720622 +0000
@@ -21,7 +21,6 @@
   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
@@ -29,7 +28,10 @@
   fi
 ])
 AC_MSG_RESULT($bash_cv_func_strtoimax)
-if test $bash_cv_func_strtoimax = yes; then
+if test "$ac_cv_have_decl_strtoimax" = "yes" ; then
+AC_DEFINE([HAVE_DECL_STRTOIMAX], [1])
+fi
+if test $bash_cv_func_strtoimax = no; then
 AC_LIBOBJ(strtoimax)
 fi
 ])
--- configure.orig	2023-07-25 04:26:22.819543268 +0000
+++ configure	2023-07-25 04:27:51.837057791 +0000
@@ -20444,7 +20444,11 @@
 
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strtoimax" >&5
 printf "%s\n" "$bash_cv_func_strtoimax" >&6; }
-if test $bash_cv_func_strtoimax = yes; then
+if test "$ac_cv_have_decl_strtoimax" = "yes" ; then
+printf "%s\n" "#define HAVE_DECL_STRTOIMAX 1" >>confdefs.h
+
+fi
+if test $bash_cv_func_strtoimax = no; then
 case " $LIBOBJS " in
   *" strtoimax.$ac_objext "* ) ;;
   *) LIBOBJS="$LIBOBJS strtoimax.$ac_objext"
