build: drop obsolete autoconf macro
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Thu, 3 Oct 2024 13:58:06 +0000 (15:58 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 7 Oct 2024 08:06:27 +0000 (10:06 +0200)
AC_HEADER_STDC is deprecated and should be replaced with
AC_CHECK_INCLUDES_DEFAULT. We haven't done this until now because the
latter is only available since autoconf v2.71. We kept supporting v2.69
for the sake of Debian stable but it has since upgraded to autoconf v2.71
so we update configure.ac as well and fix an autoconf warning.

Link: https://lore.kernel.org/r/20241003135806.41934-1-brgl@bgdev.pl
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
configure.ac

index cfa099771280f56a4bddaabb0d81d8403ed0dd0d..b12db221180d2daafcc434529be569f320461a7d 100644 (file)
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-or-later
 # SPDX-FileCopyrightText: 2017-2022 Bartosz Golaszewski <brgl@bgdev.pl>
 
-AC_PREREQ([2.69])
+AC_PREREQ([2.71])
 
 AC_INIT([libgpiod], [2.2])
 AC_SUBST(EXTRA_VERSION, [-rc2])
@@ -74,7 +74,8 @@ AC_DEFUN([HEADER_NOT_FOUND_CXX],
        [ERR_NOT_FOUND([$1 header], [C++ bindings])])
 
 # This is always checked (library needs this)
-AC_HEADER_STDC
+AC_CHECK_INCLUDES_DEFAULT
+
 AC_FUNC_MALLOC
 AC_HEADER_STDBOOL
 AC_CHECK_FUNC([ioctl], [], [FUNC_NOT_FOUND_LIB([ioctl])])