From 3af6dd26174bb719c241447d1ea55e40597bb9a6 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sun, 5 Jul 2026 01:32:50 +0300
Subject: [PATCH] acinclude/tar.m4: update from automake mainstream.
---
acinclude/tar.m4 | 6 ++--
configure | 77 +++++++++++++++++++++++++++---------------------
2 files changed, 46 insertions(+), 37 deletions(-)
diff --git a/acinclude/tar.m4 b/acinclude/tar.m4
index 99e3a894..edd334c2 100644
--- a/acinclude/tar.m4
+++ b/acinclude/tar.m4
@@ -1,6 +1,6 @@
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2020 Free Software Foundation, Inc.
+# Copyright (C) 2004-2025 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -80,7 +80,7 @@ m4_if([$1], [v7],
case $_am_tool in
gnutar)
for _am_tar in tar gnutar gtar; do
- AM_RUN_LOG([$_am_tar --version]) && break
+ AM_RUN_LOG([$_am_tar --version | grep GNU >/dev/null]) && break
done
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -cf - "'"$$tardir"'
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -cf - "'"$tardir"'
@@ -89,7 +89,7 @@ m4_if([$1], [v7],
plaintar)
# Must skip GNU tar: if it does not support --format= it doesn't create
# ustar tarball either.
- (tar --version) >/dev/null 2>&1 && continue
+ (tar --version | grep GNU) >/dev/null 2>&1 && continue
am__tar='tar cf - "$$tardir"'
am__tar_='tar cf - "$tardir"'
am__untar='tar xf -'
diff --git a/configure b/configure
index 009db796..482fb2c3 100755
--- a/configure
+++ b/configure
@@ -1853,8 +1853,8 @@ fi
# ac_fn_c_try_run LINENO
# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
+# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
+# executables *can* be run.
ac_fn_c_try_run ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
@@ -2124,6 +2124,8 @@ done
# WARNING: Use '\'' to represent an apostrophe within the trap.
# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
+ # Sanitize IFS.
+ IFS=" "" $as_nl"
# Save into config.log some information that might help in debugging.
{
echo
@@ -2981,6 +2983,8 @@ int
main ()
{
FILE *f = fopen ("conftest.out", "w");
+ if (!f)
+ return 1;
return ferror (f) || fclose (f) != 0;
;
@@ -2992,7 +2996,9 @@ ac_clean_files="$ac_clean_files conftest.out"
# the compiler is broken, or we cross compile.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
+if test "$cross_compiling" = maybe && test "x$build" != "x$host"; then
+ cross_compiling=yes
+elif test "$cross_compiling" != yes; then
{ { ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -3879,13 +3885,13 @@ if ${lt_cv_nm_interface+:} false; then :
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:3882: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:3888: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:3885: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:3891: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:3888: output\"" >&5)
+ (eval echo "\"\$as_me:3894: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -5096,7 +5102,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 5099 "configure"' > conftest.$ac_ext
+ echo '#line 5105 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -6926,11 +6932,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6929: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6935: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6933: \$? = $ac_status" >&5
+ echo "$as_me:6939: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7265,11 +7271,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7268: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7274: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7272: \$? = $ac_status" >&5
+ echo "$as_me:7278: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7370,11 +7376,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7373: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7379: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7377: \$? = $ac_status" >&5
+ echo "$as_me:7383: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -7425,11 +7431,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7428: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7434: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7432: \$? = $ac_status" >&5
+ echo "$as_me:7438: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -9787,7 +9793,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 9790 "configure"
+#line 9796 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9883,7 +9889,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 9886 "configure"
+#line 9892 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10713,8 +10719,8 @@ $as_echo_n "checking how to create a ustar tar archive... " >&6; }
case $_am_tool in
gnutar)
for _am_tar in tar gnutar gtar; do
- { echo "$as_me:$LINENO: $_am_tar --version" >&5
- ($_am_tar --version) >&5 2>&5
+ { echo "$as_me:$LINENO: $_am_tar --version | grep GNU >/dev/null" >&5
+ ($_am_tar --version | grep GNU >/dev/null) >&5 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && break
@@ -10726,7 +10732,7 @@ $as_echo_n "checking how to create a ustar tar archive... " >&6; }
plaintar)
# Must skip GNU tar: if it does not support --format= it doesn't create
# ustar tarball either.
- (tar --version) >/dev/null 2>&1 && continue
+ (tar --version | grep GNU) >/dev/null 2>&1 && continue
am__tar='tar cf - "$$tardir"'
am__tar_='tar cf - "$tardir"'
am__untar='tar xf -'
@@ -11756,27 +11762,27 @@ fi
$as_echo_n "checking for alloca... " >&6; }
if ${ac_cv_func_alloca_works+:} false; then :
$as_echo_n "(cached) " >&6
+else
+ if test $ac_cv_working_alloca_h = yes; then
+ ac_cv_func_alloca_works=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+#include <stddef.h>
+#ifndef alloca
+# ifdef __GNUC__
+# define alloca __builtin_alloca
+# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# else
-# ifdef HAVE_ALLOCA_H
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca /* predefined by HP cc +Olibcalls */
-void *alloca (size_t);
-# endif
-# endif
+# ifdef __cplusplus
+extern "C"
# endif
+void *alloca (size_t);
# endif
#endif
@@ -11793,10 +11799,13 @@ if ac_fn_c_try_link "$LINENO"; then :
ac_cv_func_alloca_works=yes
else
ac_cv_func_alloca_works=no
+
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
+
+fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
$as_echo "$ac_cv_func_alloca_works" >&6; }