{"thread":{"id":"5510","subject":"[PATCH 1/2] autoconf: Set NO_ICONV if iconv is found neither in libc, nor in libiconv","startedAt":"2006-09-07T11:47:31Z","lastAt":"2006-09-07T11:48:49Z","messageCount":3,"participants":["Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"26512","messageId":"200609071347.32152.jnareb@gmail.com","threadId":"5510","inReplyTo":null,"subject":"[PATCH 0/2] autoconf: iconv","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-09-07T11:47:31Z","receivedAt":"2006-09-07T11:47:31Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Those two patches add support for remaining iconv related compilation\nvariables, namely NO_ICONV and ICONVDIR to configure.ac.  First patch\nsets NO_ICONV if no iconv implementation was found (autodetection),\nsecond adds --without-iconv/--with-iconv=PATH option to generated\n./configure script (user input).\n\nThis series is based on my earlier autoconf series \"[PATCH 0/5] Some\nautoconf patches\", but with little editing of config.mak.in patch in\nthe PATCH 2/2 they could be applied on top of 'next' branch.\n\nShortlog:\n [PATCH 1/2] autoconf: Set NO_ICONV if iconv is found neither in libc, nor in libiconv\n [PATCH 2/2] autoconf: Add support for setting NO_ICONV and ICONVDIR\n\nDiffstat:\n config.mak.in |    2 +-\n configure.ac  |   18 ++++++++++++++++--\n 2 files changed, 17 insertions(+), 3 deletions(-)\n\n-- \nJakub Narebski\nShadeHawk on #git\nPoland\n"},{"id":"26511","messageId":"200609071348.08808.jnareb@gmail.com","threadId":"5510","inReplyTo":"200609071347.32152.jnareb@gmail.com","subject":"[PATCH 1/2] autoconf: Set NO_ICONV if iconv is found neither in libc, nor in libiconv","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-09-07T11:48:08Z","receivedAt":"2006-09-07T11:48:08Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Signed-off-by: Jakub Narebski <jnareb@gmail.com>\n---\nThis patch only adds NO_ICONV=YesPlease, and it never unsets\nNO_ICONV. This doesn't matter now because there is no setting\nNO_ICONV value in Makefile (no architecture/system based detection).\n\n configure.ac |    7 +++++--\n 1 files changed, 5 insertions(+), 2 deletions(-)\n\ndiff --git a/configure.ac b/configure.ac\nindex 482c849..8af276c 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -143,9 +143,12 @@ AC_CHECK_LIB([expat], [XML_ParserCreate]\n AC_SUBST(NO_EXPAT)\n #\n # Define NEEDS_LIBICONV if linking with libc is not enough (Darwin).\n+# Define NO_ICONV if neither libc nor libiconv support iconv.\n AC_CHECK_LIB([c], [iconv],\n-[NEEDS_LIBICONV=],\n-[NEEDS_LIBICONV=YesPlease])\n+\t[NEEDS_LIBICONV=],\n+\tAC_CHECK_LIB([iconv], [iconv],\n+\t\t[NEEDS_LIBICONV=YesPlease],\n+\t\t[GIT_CONF_APPEND_LINE([NO_ICONV=YesPlease])]))\n AC_SUBST(NEEDS_LIBICONV)\n test -n \"$NEEDS_LIBICONV\" && LIBS=\"$LIBS -liconv\"\n #\n-- \n1.4.2\n"},{"id":"26513","messageId":"200609071348.49935.jnareb@gmail.com","threadId":"5510","inReplyTo":"200609071347.32152.jnareb@gmail.com","subject":"[PATCH 2/2] autoconf: Add support for setting NO_ICONV and ICONVDIR","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-09-07T11:48:49Z","receivedAt":"2006-09-07T11:48:49Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Add support for ./configure options --without-iconv (if neither libc\nnor libiconv properly support iconv), and for --with-iconv=PATH (to\nset prefix to libiconv library and headers, used only when\nNEED_LIBICONV is set).  While at it, make ./configure set or unset\nNO_ICONV always (it is not autodetected in Makefile).\n\nSigned-off-by: Jakub Narebski <jnareb@gmail.com>\n---\nThe config.mak.in patch just adds or uncomments \n\nNO_ICONV=@NO_ICONV@\n\nat the end of the file. If there is conflict during applying this part\nof patchset (for example \"autoconf: Add some commented out variables\nto config.mak.in\" and \"autoconf: Preliminary check for working mmap\"\nare not applied), just modify config.mak.in to have this line at the\nend.\n\n config.mak.in |    2 +-\n configure.ac  |   13 ++++++++++++-\n 2 files changed, 13 insertions(+), 2 deletions(-)\n\ndiff --git a/config.mak.in b/config.mak.in\nindex 2c8fd2c..fccde61 100644\n--- a/config.mak.in\n+++ b/config.mak.in\n@@ -38,5 +38,5 @@ NO_STRCASESTR=@NO_STRCASESTR@\n NO_STRLCPY=@NO_STRLCPY@\n NO_SETENV=@NO_SETENV@\n NO_MMAP=@NO_MMAP@\n-#NO_ICONV=@NO_ICONV@\n+NO_ICONV=@NO_ICONV@\n \ndiff --git a/configure.ac b/configure.ac\nindex 8af276c..6a980a5 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -148,8 +148,9 @@ AC_CHECK_LIB([c], [iconv],\n \t[NEEDS_LIBICONV=],\n \tAC_CHECK_LIB([iconv], [iconv],\n \t\t[NEEDS_LIBICONV=YesPlease],\n-\t\t[GIT_CONF_APPEND_LINE([NO_ICONV=YesPlease])]))\n+\t\t[NO_ICONV=YesPlease]))\n AC_SUBST(NEEDS_LIBICONV)\n+AC_SUBST(NO_ICONV)\n test -n \"$NEEDS_LIBICONV\" && LIBS=\"$LIBS -liconv\"\n #\n # Define NEEDS_SOCKET if linking with libc is not enough (SunOS,\n@@ -350,6 +351,16 @@ # specify your own (or DarwinPort's) inc\n # library directories by defining CFLAGS and LDFLAGS appropriately.\n #\n # Define NO_MMAP if you want to avoid mmap.\n+#\n+# Define NO_ICONV if your libc does not properly support iconv.\n+AC_ARG_WITH(iconv,\n+AS_HELP_STRING([--without-iconv],\n+[if your architecture doesn't properly support iconv])\n+AS_HELP_STRING([--with-iconv=PATH],\n+[PATH is prefix for libiconv library and headers])\n+AS_HELP_STRING([],\n+[used only if you need linking with libiconv]),\n+GIT_PARSE_WITH(iconv))\n \n ## --enable-FEATURE[=ARG] and --disable-FEATURE\n #\n-- \n1.4.2\n"}]}