Skip to content

Commit 62fb6d0

Browse files
AMDmi3gitster
authored andcommitted
configure.ac: link with -liconv for locale_charset()
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 2f93541 commit 62fb6d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ GIT_CONF_SUBST([HAVE_STRINGS_H])
890890
# and libcharset does
891891
CHARSET_LIB=
892892
AC_CHECK_LIB([iconv], [locale_charset],
893-
[],
893+
[CHARSET_LIB=-liconv],
894894
[AC_CHECK_LIB([charset], [locale_charset],
895895
[CHARSET_LIB=-lcharset])])
896896
GIT_CONF_SUBST([CHARSET_LIB])

0 commit comments

Comments
 (0)