From 074e2eaab0e2f200d6441c4e37bd8d682d1548d8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 17 Nov 2022 09:03:06 -0800 Subject: configure: Fix possible regressions with trunk autoconf (vs 2.71) Signed-off-by: Cosmin Truta --- configure.ac | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 -- cgit v1.2.1