git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH RFC] gettext: Support building on non-GNU with -lintl
Date: Sat, 5 Jun 2010 14:57:38 +0000	[thread overview]
Message-ID: <AANLkTin5HPiXcgr3WKcbCSn-48BOHXUIL-E7Kw69ap6Q@mail.gmail.com> (raw)
In-Reply-To: <m3aar9r9ek.fsf@localhost.localdomain>

On Sat, Jun 5, 2010 at 11:42, Jakub Narebski <jnareb@gmail.com> wrote:
> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
>
>> Change the build process on non-GNU systems to use -lintl if
>> NO_GETTEXT hasn't been set.
>>
>> Systems that use the GNU C Library don't need this, but on others the
>> GNU libintl library is an externally install package, so we need to
>> explicitly link to it.
>>
>> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
>> ---
>
> [...]
>> diff --git a/Makefile b/Makefile
>> index 5169aec..1dfcd65 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -28,6 +28,15 @@ all::
>>  # Define NO_EXPAT if you do not have expat installed.  git-http-push is
>>  # not built, and you cannot push using http:// and https:// transports.
>>  #
>> +# Define NO_GETTEXT if you don't have libintl installed, or don't want
>> +# to build Git with localization support.
>> +#
>> +# Define NEEDS_LIBINTL if you haven't defined NO_GETTEXT=YesPlease,
>> +# but your system needs to be explicitly linked to -lintl. This is
>> +# defined automatically if we're building gettext support on systems
>> +# where we expect not to use glibc (which has libintl included in
>> +# libc).
>
> Could you add test for NEEDS_LIBINTL to configure.ac?  Thanks in
> advance.

Done:

    $ uname -s ; (git clean -dxf; gmake configure  &&
CPPFLAGS="-I/usr/local/include" ./configure) > /dev/null && egrep
"INTL|GETTEXT" config.mak.autogen
    FreeBSD
    GIT_VERSION = 1.7.0.4.732.ge63cf.dirty
    NO_GETTEXT=
    NEEDS_LIBINTL=YesPlease

The patch needed to get it working:

diff --git a/config.mak.in b/config.mak.in
index a15f3c1..c49072c 100644
--- a/config.mak.in
+++ b/config.mak.in
@@ -36,6 +36,7 @@ NO_GETTEXT=@NO_GETTEXT@
 NEEDS_LIBICONV=@NEEDS_LIBICONV@
 NEEDS_SOCKET=@NEEDS_SOCKET@
 NEEDS_RESOLV=@NEEDS_RESOLV@
+NEEDS_LIBINTL=@NEEDS_LIBINTL@
 NEEDS_LIBGEN=@NEEDS_LIBGEN@
 NO_SYS_SELECT_H=@NO_SYS_SELECT_H@
 NO_D_INO_IN_DIRENT=@NO_D_INO_IN_DIRENT@
diff --git a/configure.ac b/configure.ac
index 7bebfd8..74879b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -559,6 +559,12 @@ AC_CHECK_LIB([c], [basename],
 AC_SUBST(NEEDS_LIBGEN)
 test -n "$NEEDS_LIBGEN" && LIBS="$LIBS -lgen"

+AC_CHECK_LIB([c], [gettext],
+[NEEDS_LIBINTL=],
+[NEEDS_LIBINTL=YesPlease])
+AC_SUBST(NEEDS_LIBINTL)
+test -n "$NEEDS_LIBINTL" && LIBS="$LIBS -lintl"
+
 ## Checks for header files.
 AC_MSG_NOTICE([CHECKS for header files])
 #

      reply	other threads:[~2010-06-05 14:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-04 16:36 [PATCH RFC] gettext: Support building on non-GNU with -lintl Ævar Arnfjörð Bjarmason
2010-06-05 11:42 ` Jakub Narebski
2010-06-05 14:57   ` Ævar Arnfjörð Bjarmason [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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=AANLkTin5HPiXcgr3WKcbCSn-48BOHXUIL-E7Kw69ap6Q@mail.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    /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.
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).