SDL_ttf: tar.m4: applied a bug fix for ustar support from mainstream automake git (3d21b)

From 3d21bdb0c9647d3f988f187acf7e8a1316e2edfa Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sat, 5 Mar 2022 23:56:02 +0300
Subject: [PATCH] tar.m4: applied a bug fix for ustar support from mainstream
 automake git

see https://bugs.gnu.org/20713
---
 acinclude/tar.m4 | 16 ++++++++++------
 configure        | 18 ++++++++++++------
 2 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/acinclude/tar.m4 b/acinclude/tar.m4
index 1469f54..99e3a89 100644
--- a/acinclude/tar.m4
+++ b/acinclude/tar.m4
@@ -47,15 +47,19 @@ m4_if([$1], [v7],
       am_uid=`id -u || echo unknown`
       am_gid=`id -g || echo unknown`
       AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
-      if test $am_uid -le $am_max_uid; then
-         AC_MSG_RESULT([yes])
+      if test x$am_uid = xunknown; then
+        AC_MSG_WARN([ancient id detected; assuming current UID is ok, but dist-ustar might not work])
+      elif test $am_uid -le $am_max_uid; then
+        AC_MSG_RESULT([yes])
       else
-         AC_MSG_RESULT([no])
-         _am_tools=none
+        AC_MSG_RESULT([no])
+        _am_tools=none
       fi
       AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
-      if test $am_gid -le $am_max_gid; then
-         AC_MSG_RESULT([yes])
+      if test x$gm_gid = xunknown; then
+        AC_MSG_WARN([ancient id detected; assuming current GID is ok, but dist-ustar might not work])
+      elif test $am_gid -le $am_max_gid; then
+        AC_MSG_RESULT([yes])
       else
         AC_MSG_RESULT([no])
         _am_tools=none
diff --git a/configure b/configure
index 914b41e..dd90a12 100755
--- a/configure
+++ b/configure
@@ -10684,18 +10684,24 @@ _am_tools='gnutar plaintar pax cpio none'
       am_gid=`id -g || echo unknown`
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5
 $as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; }
-      if test $am_uid -le $am_max_uid; then
-         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+      if test x$am_uid = xunknown; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ancient id detected; assuming current UID is ok, but dist-ustar might not work" >&5
+$as_echo "$as_me: WARNING: ancient id detected; assuming current UID is ok, but dist-ustar might not work" >&2;}
+      elif test $am_uid -le $am_max_uid; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
       else
-         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-         _am_tools=none
+        _am_tools=none
       fi
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5
 $as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; }
-      if test $am_gid -le $am_max_gid; then
-         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+      if test x$gm_gid = xunknown; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ancient id detected; assuming current GID is ok, but dist-ustar might not work" >&5
+$as_echo "$as_me: WARNING: ancient id detected; assuming current GID is ok, but dist-ustar might not work" >&2;}
+      elif test $am_gid -le $am_max_gid; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
       else
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5