git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Дилян Палаузов" <dilyan.palauzov@aegee.org>
To: git@vger.kernel.org
Subject: Re: 1.7.9, libcharset missing from EXTLIBS
Date: Sun, 12 Feb 2012 01:55:01 +0100	[thread overview]
Message-ID: <4F370DE5.70400@aegee.org> (raw)
In-Reply-To: <7vd39mph9x.fsf@alter.siamese.dyndns.org>

[-- Attachment #1: Type: text/plain, Size: 2983 bytes --]

Hello,

please consider the patch below as fix for the problem.  It checks if 
locale_charset is not in libiconv, but in libcharset and in this case 
appends -lcharset to EXTLIBS.

Със здраве
   Дилян

diff -u git-1.7.9.orig/config.mak.in git-1.7.9/config.mak.in
--- git-1.7.9.orig/config.mak.in        2012-01-27 20:51:04.000000000 +0000
+++ git-1.7.9/config.mak.in     2012-02-12 00:52:41.457968080 +0000
@@ -74,3 +74,4 @@
  NO_PTHREADS=@NO_PTHREADS@
  PTHREAD_CFLAGS=@PTHREAD_CFLAGS@
  PTHREAD_LIBS=@PTHREAD_LIBS@
+LINK_CHARSET=@LINK_CHARSET@
diff -u git-1.7.9.orig/configure.ac git-1.7.9/configure.ac
--- git-1.7.9.orig/configure.ac 2012-01-27 20:51:04.000000000 +0000
+++ git-1.7.9/configure.ac      2012-02-12 00:44:29.222967868 +0000
@@ -836,6 +836,18 @@
  [HAVE_LIBCHARSET_H=YesPlease],
  [HAVE_LIBCHARSET_H=])
  AC_SUBST(HAVE_LIBCHARSET_H)
+# Define LINK_LIBCHARSET if libiconv does not export the locale_charset 
symbol
+# and liblibcharset does
+LINK_CHARSET=
+AC_CHECK_LIB([iconv], [locale_charset],
+       [],
+       [AC_CHECK_LIB([charset], [locale_charset],
+                     [LINK_CHARSET=Yes])
+       ]
+)
+AC_SUBST(LINK_CHARSET)
+
+
  #
  # Define NO_STRCASESTR if you don't have strcasestr.
  GIT_CHECK_FUNC(strcasestr,
diff -u git-1.7.9.orig/Makefile git-1.7.9/Makefile
--- git-1.7.9.orig/Makefile     2012-01-27 20:51:04.000000000 +0000
+++ git-1.7.9/Makefile  2012-02-12 00:35:23.982967555 +0000
@@ -1692,6 +1692,9 @@

  ifdef HAVE_LIBCHARSET_H
         BASIC_CFLAGS += -DHAVE_LIBCHARSET_H
+ifdef LINK_CHARSET
+       EXTLIBS += -lcharset
+endif
  endif

  ifdef HAVE_DEV_TTY

On 10.02.2012 21:25, Junio C Hamano wrote:
> Junio C Hamano<gitster@pobox.com>  writes:
>
>> Дилян Палаузов<dilyan.palauzov@aegee.org>  writes:
>>
>>>>> What I am wondering is there are systems that need to include the header,
>>>>> but locale_charset() does not live in /lib/libcharset.a, in which case we
>>>>> cannot make HAVE_LIBCHARSET_H imply use of -lcharset.
>>>
>>> I do not understand this.  If you want to use a function from
>>> libcharset, you have to use both #include<libcharset.h>  and
>>> -lcharset.
>>
>> You are mistaken.
>>
>> The only constraint is that you have to "#include<libcharset.h>" and need
>> to link with the library that has locale_charset() defined.
>
> I think the follow-ups in this thread already demonstrated why it is an
> insufficient solution to make HAVE_LIBCHARSET_H imply -lcharset.
>
> We would instead need:
>
> 	ifeq ($(uname_S),MyHomeBrewLinux)
>          	HAVE_LIBCHARSET_H = YesPlease
>                  EXTLIBS += -lcharset
> 	endif
>
> or
>
> 	# Define NEEDS_CHARSETLIB if you use HAVE_LIBCHARSET_H and
>          # need to link with -lcharset
> 	NEEDS_CHARSETLIB =
>
> 	ifeq ($(uname_S),MyHomeBrewLinux)
>          	HAVE_LIBCHARSET_H = YesPlease
> 		NEEDS_CHARSETLIB = YesPlease
> 	endif
>
> 	ifdef NEEDS_CHARSETLIB
>          	EXTLIBS += -lcharset
> 	endif
>
> or something like that, I guess.
>

[-- Attachment #2: dilyan_palauzov.vcf --]
[-- Type: text/x-vcard, Size: 381 bytes --]

begin:vcard
fn;quoted-printable:=D0=94=D0=B8=D0=BB=D1=8F=D0=BD =D0=9F=D0=B0=D0=BB=D0=B0=D1=83=D0=B7=D0=BE=
	=D0=B2
n;quoted-printable;quoted-printable:=D0=9F=D0=B0=D0=BB=D0=B0=D1=83=D0=B7=D0=BE=D0=B2;=D0=94=D0=B8=D0=BB=D1=8F=D0=BD
email;internet:dilyan.palauzov@aegee.org
tel;home:+49-721-94193270
tel;cell:+49-162-4091172
note:sip:8372@aegee.org
version:2.1
end:vcard


  reply	other threads:[~2012-02-12  0:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-10  1:29 1.7.9, libcharset missing from EXTLIBS Дилян Палаузов
2012-02-10  2:13 ` Junio C Hamano
2012-02-10 10:06   ` Ævar Arnfjörð Bjarmason
2012-02-10 10:21     ` Дилян Палаузов
2012-02-10 18:35       ` Junio C Hamano
2012-02-10 19:52         ` Dilyan Palauzov
2012-02-10 20:10           ` Erik Faye-Lund
2012-02-10 20:25         ` Junio C Hamano
2012-02-12  0:55           ` Дилян Палаузов [this message]
2012-02-12  1:03             ` Ævar Arnfjörð Bjarmason
2012-02-12 10:30             ` Junio C Hamano
2012-02-12 16:23               ` [PATCH] " Дилян Палаузов
2012-02-10 13:15     ` Jakub Narebski

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=4F370DE5.70400@aegee.org \
    --to=dilyan.palauzov@aegee.org \
    --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).