summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6ff88de)
raw | patch | inline | side by side (parent: 6ff88de)
author | Jakub Narebski <jnareb@gmail.com> | |
Thu, 7 Sep 2006 11:48:49 +0000 (13:48 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 7 Sep 2006 20:04:21 +0000 (13:04 -0700) |
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>
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>
config.mak.in | patch | blob | history | |
configure.ac | patch | blob | history |
diff --git a/config.mak.in b/config.mak.in
index 369e6116e0aa63bc9e6ca88996b2dcfc12ebb967..6d20673b24552c505664c8d6983eb9ceb1b106d8 100644 (file)
--- a/config.mak.in
+++ b/config.mak.in
NO_STRCASESTR=@NO_STRCASESTR@
NO_STRLCPY=@NO_STRLCPY@
NO_SETENV=@NO_SETENV@
+NO_ICONV=@NO_ICONV@
diff --git a/configure.ac b/configure.ac
index 9bbc7dafc42190cde1bfc3d049412cfc11959bfb..511cac93d6cec11f3717e810d0c80b27646a5713 100644 (file)
--- a/configure.ac
+++ b/configure.ac
[NEEDS_LIBICONV=],
AC_CHECK_LIB([iconv], [iconv],
[NEEDS_LIBICONV=YesPlease],
- [GIT_CONF_APPEND_LINE([NO_ICONV=YesPlease])]))
+ [NO_ICONV=YesPlease]))
AC_SUBST(NEEDS_LIBICONV)
+AC_SUBST(NO_ICONV)
test -n "$NEEDS_LIBICONV" && LIBS="$LIBS -liconv"
#
# Define NEEDS_SOCKET if linking with libc is not enough (SunOS,
# 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
#