[Top][All Lists]

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

[PATCH] configure.ac: Fix autoconf quoting breaking AC_FUNC_MEMCMP

From: Sam James
Subject: [PATCH] configure.ac: Fix autoconf quoting breaking AC_FUNC_MEMCMP
Date: Thu, 2 Feb 2023 06:23:05 +0000

See the linked autoconf bug for details, but the gist is that AC_FUNC_MEMCMP
ends up lacking the needed includes for string.h if a raw 'if' is used as
opposed to AS_IF.

Quote properly with AS_IF to allow proper generation of the AC_FUNC_MEMCMP
test and avoid -Wimplicit-function-declaration (which will be fatal in some
compilers soon, like Clang 16) in its test.

Bug: https://savannah.gnu.org/support/?110530
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7121f94..4e0f72f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,11 +35,11 @@ AC_ARG_WITH(readline,
 dnl Check for readline library _and_ headers
-if test x"$ac_cv_use_readline" = "xyes"; then
+AS_IF([test x"$ac_cv_use_readline" = "xyes"], [
        AC_CHECK_LIB(ncurses, tputs)
        AC_CHECK_LIB(readline, readline)
        AC_CHECK_HEADERS(readline/readline.h readline/history.h)
 dnl Checks for header files.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]