Rename builtin-zip-tree.c to archive-zip.c
[gitweb.git] / configure.ac
index 64c8345f64a49f5e6ed3a751035e8d0c4f465d19..511cac93d6cec11f3717e810d0c80b27646a5713 100644 (file)
@@ -143,11 +143,15 @@ 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],
+               [NO_ICONV=YesPlease]))
 AC_SUBST(NEEDS_LIBICONV)
-test -n "$NEEDS_SOCKET" && LIBS="$LIBS -liconv"
+AC_SUBST(NO_ICONV)
+test -n "$NEEDS_LIBICONV" && LIBS="$LIBS -liconv"
 #
 # Define NEEDS_SOCKET if linking with libc is not enough (SunOS,
 # Patrick Mauritz).
@@ -340,6 +344,16 @@ GIT_PARSE_WITH(expat))
 # library directories by defining CFLAGS and LDFLAGS appropriately.
 #
 # Define NO_MMAP if you want to avoid mmap.
+#
+# Define NO_ICONV if your libc does not properly support iconv.
+AC_ARG_WITH(iconv,
+AS_HELP_STRING([--without-iconv],
+[if your architecture doesn't properly support iconv])
+AS_HELP_STRING([--with-iconv=PATH],
+[PATH is prefix for libiconv library and headers])
+AS_HELP_STRING([],
+[used only if you need linking with libiconv]),
+GIT_PARSE_WITH(iconv))
 
 ## --enable-FEATURE[=ARG] and --disable-FEATURE
 #