git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH 2/2] autoconf: Add support for setting NO_ICONV and ICONVDIR
Date: Thu, 7 Sep 2006 13:48:49 +0200	[thread overview]
Message-ID: <200609071348.49935.jnareb@gmail.com> (raw)
In-Reply-To: <200609071347.32152.jnareb@gmail.com>

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>
---
The config.mak.in patch just adds or uncomments 

NO_ICONV=@NO_ICONV@

at the end of the file. If there is conflict during applying this part
of patchset (for example "autoconf: Add some commented out variables
to config.mak.in" and "autoconf: Preliminary check for working mmap"
are not applied), just modify config.mak.in to have this line at the
end.

 config.mak.in |    2 +-
 configure.ac  |   13 ++++++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/config.mak.in b/config.mak.in
index 2c8fd2c..fccde61 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -38,5 +38,5 @@ NO_STRCASESTR=@NO_STRCASESTR@
 NO_STRLCPY=@NO_STRLCPY@
 NO_SETENV=@NO_SETENV@
 NO_MMAP=@NO_MMAP@
-#NO_ICONV=@NO_ICONV@
+NO_ICONV=@NO_ICONV@
 
diff --git a/configure.ac b/configure.ac
index 8af276c..6a980a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -148,8 +148,9 @@ AC_CHECK_LIB([c], [iconv],
 	[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,
@@ -350,6 +351,16 @@ # specify your own (or DarwinPort's) inc
 # 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
 #
-- 
1.4.2

      parent reply	other threads:[~2006-09-07 11:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-07 11:47 [PATCH 0/2] autoconf: iconv Jakub Narebski
2006-09-07 11:48 ` [PATCH 1/2] autoconf: Set NO_ICONV if iconv is found neither in libc, nor in libiconv Jakub Narebski
2006-09-07 11:48 ` Jakub Narebski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200609071348.49935.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).