autoconf: Add support for setting NO_ICONV and ICONVDIR
Add support for ./configure options --without-iconv (if neither libc nor libiconv properly support iconv), and for --with-iconv=PATH (to set prefix to libiconv library and headers, used only when NEED_LIBICONV is set). While at it, make ./configure set or unset NO_ICONV always (it is not autodetected in Makefile). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Jakub Narebski committed
Sep 7, 2006 at 13:48 UTC
baf1219acbda6ba361c388363ba2e771d95bbb2d
2 files changed
+13
-1
config.mak.in
+1
@@ -37,4 +37,5 @@ NO_C99_FORMAT=@NO_C99_FORMAT@
37
NO_STRCASESTR=@NO_STRCASESTR@
38
NO_STRLCPY=@NO_STRLCPY@
39
NO_SETENV=@NO_SETENV@
40
+NO_ICONV=@NO_ICONV@
41
configure.ac
+12
-1
@@ -148,8 +148,9 @@ AC_CHECK_LIB([c], [iconv],
148
[NEEDS_LIBICONV=],
149
AC_CHECK_LIB([iconv], [iconv],
150
[NEEDS_LIBICONV=YesPlease],
151
- [GIT_CONF_APPEND_LINE([NO_ICONV=YesPlease])]))
151
+ [NO_ICONV=YesPlease]))
152
AC_SUBST(NEEDS_LIBICONV)
153
+AC_SUBST(NO_ICONV)
154
test -n "$NEEDS_LIBICONV" && LIBS="$LIBS -liconv"
155
#
156
# Define NEEDS_SOCKET if linking with libc is not enough (SunOS,
@@ -343,6 +344,16 @@ GIT_PARSE_WITH(expat))
344
# library directories by defining CFLAGS and LDFLAGS appropriately.
345
#
346
# Define NO_MMAP if you want to avoid mmap.
347
+#
348
+# Define NO_ICONV if your libc does not properly support iconv.
349
+AC_ARG_WITH(iconv,
350
+AS_HELP_STRING([--without-iconv],
351
+[if your architecture doesn't properly support iconv])
352
+AS_HELP_STRING([--with-iconv=PATH],
353
+[PATH is prefix for libiconv library and headers])
354
+AS_HELP_STRING([],
355
+[used only if you need linking with libiconv]),
356
+GIT_PARSE_WITH(iconv))
357
358
## --enable-FEATURE[=ARG] and --disable-FEATURE
359
#