blob: ba2d00bf84b66304c53e1d54d8ec07486f9754a6 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From e7671c2a3be03d790cbc225cd3e784b5434fb5da Mon Sep 17 00:00:00 2001
2From: David Bauer <mail@david-bauer.net>
3Date: Mon, 16 Jan 2023 01:29:22 +0100
4Subject: [PATCH] config: switch to AC_CHECK_LIB
5
6This fixes spurious build-errors on OpenWrt, where the AM_ICONV macro
7is undefined while invoking autoconfig. Later in the build, the ICONV
8LDOPTIONS are set to @LIBICONV@, failing the build.
9
10Signed-off-by: David Bauer <mail@david-bauer.net>
11---
12 configure.ac | 5 +----
13 1 file changed, 1 insertion(+), 4 deletions(-)
14
15--- a/configure.ac
16+++ b/configure.ac
17@@ -70,10 +70,7 @@ AC_CHECK_DECLS([getmntent], [], [], [[#i
18 AC_CHECK_DECLS([getmntinfo], [], [], [[#include <sys/mount.h>]])
19
20 # optional iconv support
21-AC_ARG_WITH([iconv], AS_HELP_STRING([--without-iconv], [build without iconv support]))
22-if test "x$with_iconv" != "xno"; then
23- AM_ICONV
24-fi
25+AC_CHECK_LIB(iconv, iconv_open)
26
27 # xxd (distributed with vim) is used in the testsuite
28 AC_CHECK_PROG([XXD_FOUND], [xxd], [yes])