All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] autoconf: iconv
@ 2006-09-07 11:47 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 ` [PATCH 2/2] autoconf: Add support for setting NO_ICONV and ICONVDIR Jakub Narebski
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Narebski @ 2006-09-07 11:47 UTC (permalink / raw)
  To: git

Those two patches add support for remaining iconv related compilation
variables, namely NO_ICONV and ICONVDIR to configure.ac.  First patch
sets NO_ICONV if no iconv implementation was found (autodetection),
second adds --without-iconv/--with-iconv=PATH option to generated
./configure script (user input).

This series is based on my earlier autoconf series "[PATCH 0/5] Some
autoconf patches", but with little editing of config.mak.in patch in
the PATCH 2/2 they could be applied on top of 'next' branch.

Shortlog:
 [PATCH 1/2] autoconf: Set NO_ICONV if iconv is found neither in libc, nor in libiconv
 [PATCH 2/2] autoconf: Add support for setting NO_ICONV and ICONVDIR

Diffstat:
 config.mak.in |    2 +-
 configure.ac  |   18 ++++++++++++++++--
 2 files changed, 17 insertions(+), 3 deletions(-)

-- 
Jakub Narebski
ShadeHawk on #git
Poland

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] autoconf: Set NO_ICONV if iconv is found neither in libc, nor in libiconv
  2006-09-07 11:47 [PATCH 0/2] autoconf: iconv Jakub Narebski
@ 2006-09-07 11:48 ` Jakub Narebski
  2006-09-07 11:48 ` [PATCH 2/2] autoconf: Add support for setting NO_ICONV and ICONVDIR Jakub Narebski
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Narebski @ 2006-09-07 11:48 UTC (permalink / raw)
  To: git

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
This patch only adds NO_ICONV=YesPlease, and it never unsets
NO_ICONV. This doesn't matter now because there is no setting
NO_ICONV value in Makefile (no architecture/system based detection).

 configure.ac |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 482c849..8af276c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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"
 #
-- 
1.4.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] autoconf: Add support for setting NO_ICONV and ICONVDIR
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Narebski @ 2006-09-07 11:48 UTC (permalink / raw)
  To: git

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-09-07 11:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 2/2] autoconf: Add support for setting NO_ICONV and ICONVDIR Jakub Narebski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.