Skip to content

Commit

Permalink
autoconf: Set NO_ICONV if iconv is found neither in libc, nor in libi…
Browse files Browse the repository at this point in the history
…conv

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Jakub Narebski authored and Junio C Hamano committed Sep 7, 2006
1 parent 7bbf88c commit 6ff88de
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,12 @@ AC_CHECK_LIB([expat], [XML_ParserCreate],
AC_SUBST(NO_EXPAT)
#
# Define NEEDS_LIBICONV if linking with libc is not enough (Darwin).
# Define NO_ICONV if neither libc nor libiconv support iconv.
AC_CHECK_LIB([c], [iconv],
[NEEDS_LIBICONV=],
[NEEDS_LIBICONV=YesPlease])
[NEEDS_LIBICONV=],
AC_CHECK_LIB([iconv], [iconv],
[NEEDS_LIBICONV=YesPlease],
[GIT_CONF_APPEND_LINE([NO_ICONV=YesPlease])]))
AC_SUBST(NEEDS_LIBICONV)
test -n "$NEEDS_LIBICONV" && LIBS="$LIBS -liconv"
#
Expand Down

0 comments on commit 6ff88de

Please sign in to comment.