Re: Possible regressions with trunk autoconf (vs 2.71)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for reporting that. I installed the attached patch to work around the bug in libpng. Of course this is just a hack, but there's some benefit to it and no harm that I can see.

Could you please report the issue to the libpng maintainers? The attached second patch should work around the immediate issue for them. I am not plugged into the libpng ecosystem and don't know how to send them bug reports. Thanks.
From 078edd8c0fb36b0245df3c6ebd621225dea9b685 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@xxxxxxxxxxx>
Date: Wed, 16 Nov 2022 10:19:43 -0800
Subject: [PATCH] Cater better to underquoted callers

Problem reported by Frederic Berat in:
https://lists.gnu.org/r/autoconf/2022-11/msg00092.html
* lib/autoconf/c.m4 (AC_LANG_CALL(C)): Omit comma in comment,
which triggers bugs in underquoted callers.
---
 lib/autoconf/c.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
index 5e4301e7..a388599c 100644
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -128,7 +128,7 @@ m4_if([$2], [main], ,
    Use char because int might match the return type of a GCC
    builtin and then its argument prototype would still apply.
    The 'extern "C"' is for builds by C++ compilers;
-   although this is not generally supported in C code, supporting it here
+   although this is not generally supported in C code supporting it here
    has little cost and some practical benefit (sr 110532).  */
 #ifdef __cplusplus
 extern "C"
-- 
2.37.2

diff --git a/configure.ac b/configure.ac
index 58dddd80a..a553f8a91 100644
--- a/configure.ac
+++ b/configure.ac
@@ -138,7 +138,8 @@ AC_STRUCT_TM
 AC_C_RESTRICT
 
 # Checks for library functions.
-AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_MSG_ERROR(cannot find pow)))
+AC_CHECK_FUNCS([pow], ,
+  [AC_CHECK_LIB([m], [pow], , [AC_MSG_ERROR([cannot find pow])])])
 
 # Some later POSIX 1003.1 functions are required for test programs, failure
 # here is soft (the corresponding test program is not built).
@@ -150,8 +151,9 @@ AC_ARG_WITH(zlib-prefix,
       [prefix that may have been used in installed zlib]),
       [ZPREFIX=${withval}],
       [ZPREFIX='z_'])
-AC_CHECK_LIB(z, zlibVersion, ,
-    AC_CHECK_LIB(z, ${ZPREFIX}zlibVersion, , AC_MSG_ERROR(zlib not installed)))
+AC_CHECK_LIB([z], [zlibVersion], ,
+  [AC_CHECK_LIB([z], [${ZPREFIX}zlibVersion], ,
+     [AC_MSG_ERROR([zlib not installed])])])
 
 # The following is for pngvalid, to ensure it catches FP errors even on
 # platforms that don't enable FP exceptions, the function appears in the math

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux