git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] configure.ac: link with -liconv for locale_charset()

From
Dmitry Marakasov <amdmi3@amdmi3.ru>
Date
Mar 11, 2014, 18:35 UTC
Message-ID
<20140311183529.GA73693@hades.panopticon>
On e.g. FreeBSD 10.x, the following situation is common:
- there's iconv implementation in libc, which has no locale_charset()
  function
- there's GNU libiconv installed from Ports Collection
Git build process
- detects that iconv is in libc and thus -liconv is not needed for it
- detects locale_charset in -liconv, but for some reason doesn't add it
  to CHARSET_LIB (as it would do with -lcharset if locale_charset() was
  found there instead of -liconv)
- git doesn't build due to unresolved external locale_charset()

Fix this by adding -liconv to CHARSET_LIB if locale_charset() is detected in this library.

Signed-off-by: Dmitry Marakasov <amdmi3@amdmi3.ru>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git configure.ac configure.ac
index 2f43393..3f5c644 100644
--- configure.ac
+++ configure.ac
@@ -890,7 +890,7 @@ GIT_CONF_SUBST([HAVE_STRINGS_H])
 # and libcharset does
 CHARSET_LIB=
 AC_CHECK_LIB([iconv], [locale_charset],
-       [],
+       [CHARSET_LIB=-liconv],
        [AC_CHECK_LIB([charset], [locale_charset],
                      [CHARSET_LIB=-lcharset])])
 GIT_CONF_SUBST([CHARSET_LIB])
-- 
1.9.0
Next: Junio C Hamano
Message 1 of 6 in “configure.ac: link with -liconv for locale_charset()”
  1. configure.ac: link with -liconv for locale_charset()Dmitry Marakasov, Mar 11, 2014
  2. Junio C HamanoMar 11, 2014
  3. Дилян ПалаузовMar 11, 2014
  4. Junio C HamanoMar 20, 2014
  5. Dmitry MarakasovMar 11, 2014
  6. Dmitry MarakasovMar 12, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.