git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] fix handling of iconv configuration options
@ 2009-06-08  0:45 Marco Nelissen
  2009-06-08 21:50 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Marco Nelissen @ 2009-06-08  0:45 UTC (permalink / raw)
  To: git, gitster

Fix the way in which the configure script handles --without-iconv
(and --with-iconv=no), which it  used to essentially ignore.
Also fix the way the configure script determines the value of
NEEDS_LIBICONV, which would be incorrectly set to 'YesPlease' on
systems that lack iconv entirely.

Signed-off-by: Marco Nelissen <marcone@xs4all.nl>
---

Since configure.ac uses a mix of 2, 3 and 4 space indentation and tabs, I
wasn't quite sure what to do with regard to that. I decided to keep the
number of lines changed to a minimum, rather than changing indentation
for a bunch of lines.

 configure.ac |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 108a97f..3388036 100644
--- a/configure.ac
+++ b/configure.ac
@@ -385,6 +385,8 @@ AC_SUBST(NO_EXPAT)
 # some Solaris installations).
 # Define NO_ICONV if neither libc nor libiconv support iconv.

+if test -z $NO_ICONV; then
+
 GIT_STASH_FLAGS($ICONVDIR)

 AC_DEFUN([ICONVTEST_SRC], [
@@ -431,6 +433,12 @@ GIT_UNSTASH_FLAGS($ICONVDIR)
 AC_SUBST(NEEDS_LIBICONV)
 AC_SUBST(NO_ICONV)

+if test -n $NO_ICONV; then
+    NEEDS_LIBICONV=
+fi
+
+fi
+
 #
 # Define NO_DEFLATE_BOUND if deflateBound is missing from zlib.

-- 
1.6.3.1

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

* Re: [PATCH] fix handling of iconv configuration options
  2009-06-08  0:45 [PATCH] fix handling of iconv configuration options Marco Nelissen
@ 2009-06-08 21:50 ` Junio C Hamano
  2009-06-08 23:51   ` Marco Nelissen
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2009-06-08 21:50 UTC (permalink / raw)
  To: Marco Nelissen; +Cc: git

Marco Nelissen <marcone@xs4all.nl> writes:

> diff --git a/configure.ac b/configure.ac
> index 108a97f..3388036 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -385,6 +385,8 @@ AC_SUBST(NO_EXPAT)
>  # some Solaris installations).
>  # Define NO_ICONV if neither libc nor libiconv support iconv.
>
> +if test -z $NO_ICONV; then
> +
>  GIT_STASH_FLAGS($ICONVDIR)
>
>  AC_DEFUN([ICONVTEST_SRC], [
> @@ -431,6 +433,12 @@ GIT_UNSTASH_FLAGS($ICONVDIR)
>  AC_SUBST(NEEDS_LIBICONV)
>  AC_SUBST(NO_ICONV)
>
> +if test -n $NO_ICONV; then
> +    NEEDS_LIBICONV=
> +fi
> +
> +fi
> +

Hmm, have you tested this with both NO_ICONV defined and undefined?

Because ...

	$ test -z ; echo $?
        0
	$ test -n ; echo $?
        0

... I would feel better if you had dq around $NO_ICONV in both tests.

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

* Re: [PATCH] fix handling of iconv configuration options
  2009-06-08 21:50 ` Junio C Hamano
@ 2009-06-08 23:51   ` Marco Nelissen
  0 siblings, 0 replies; 4+ messages in thread
From: Marco Nelissen @ 2009-06-08 23:51 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On Mon, Jun 8, 2009 at 2:50 PM, Junio C Hamano<gitster@pobox.com> wrote:
> Marco Nelissen <marcone@xs4all.nl> writes:
>
>> diff --git a/configure.ac b/configure.ac
>> index 108a97f..3388036 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -385,6 +385,8 @@ AC_SUBST(NO_EXPAT)
>>  # some Solaris installations).
>>  # Define NO_ICONV if neither libc nor libiconv support iconv.
>>
>> +if test -z $NO_ICONV; then
>> +
>>  GIT_STASH_FLAGS($ICONVDIR)
>>
>>  AC_DEFUN([ICONVTEST_SRC], [
>> @@ -431,6 +433,12 @@ GIT_UNSTASH_FLAGS($ICONVDIR)
>>  AC_SUBST(NEEDS_LIBICONV)
>>  AC_SUBST(NO_ICONV)
>>
>> +if test -n $NO_ICONV; then
>> +    NEEDS_LIBICONV=
>> +fi
>> +
>> +fi
>> +
>
> Hmm, have you tested this with both NO_ICONV defined and undefined?
>
> Because ...
>
>        $ test -z ; echo $?
>        0
>        $ test -n ; echo $?
>        0
>
> ... I would feel better if you had dq around $NO_ICONV in both tests.

Ah, you're right. I tested that it didn't incorrectly set
NEEDS_LIBICONV on a system that doesn't have/need it, but didn't test
that it doesn't unset it on a system that does need it (because I
don't have such a system).

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

* [PATCH] fix handling of iconv configuration options
@ 2009-06-09  3:46 Marco Nelissen
  0 siblings, 0 replies; 4+ messages in thread
From: Marco Nelissen @ 2009-06-09  3:46 UTC (permalink / raw)
  To: git, gitster

Fix the way in which the configure script handles --without-iconv
(and --with-iconv=no), which it  used to essentially ignore.
Also fix the way the configure script determines the value of
NEEDS_LIBICONV, which would be incorrectly set to 'YesPlease' on
systems that lack iconv entirely.

Signed-off-by: Marco Nelissen <marcone@xs4all.nl>
---

Take two: use doublequotes in test

 configure.ac |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 108a97f..bd00eba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -385,6 +385,8 @@ AC_SUBST(NO_EXPAT)
 # some Solaris installations).
 # Define NO_ICONV if neither libc nor libiconv support iconv.

+if test -z "$NO_ICONV"; then
+
 GIT_STASH_FLAGS($ICONVDIR)

 AC_DEFUN([ICONVTEST_SRC], [
@@ -431,6 +433,12 @@ GIT_UNSTASH_FLAGS($ICONVDIR)
 AC_SUBST(NEEDS_LIBICONV)
 AC_SUBST(NO_ICONV)

+if test -n "$NO_ICONV"; then
+    NEEDS_LIBICONV=
+fi
+
+fi
+
 #
 # Define NO_DEFLATE_BOUND if deflateBound is missing from zlib.

-- 
1.6.3.1

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

end of thread, other threads:[~2009-06-09  3:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-08  0:45 [PATCH] fix handling of iconv configuration options Marco Nelissen
2009-06-08 21:50 ` Junio C Hamano
2009-06-08 23:51   ` Marco Nelissen
  -- strict thread matches above, loose matches on Subject: below --
2009-06-09  3:46 Marco Nelissen

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).