git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Ben Walton <bwalton@artsci.utoronto.ca>,
	"David M. Syzdek" <david.syzdek@acsalaska.net>
Subject: Re: [PATCH/RCF] autoconf: Check if <libintl.h> exists and set NO_GETTEXT
Date: Tue, 1 Jun 2010 23:22:23 +0200	[thread overview]
Message-ID: <201006012322.24899.jnareb@gmail.com> (raw)
In-Reply-To: <1275415908-24838-1-git-send-email-avarab@gmail.com>

On Tue, Jun 1, 2010, Ævar Arnfjörð Bjarmason wrote:
> On Tue, Jun 1, 2010 at 17:01, Jakub Narebski <jnareb@gmail.com> wrote:
> > [...]
> > Could you also provide change to configure.ac, so that ./configure
> > would detect if we have gettext installed or not?  Thanks in advance.
> 
> Here's a check that just checks if we have libintl.h similar to the
> existing checks for libgen.h and other headers.
> 
> Do you think this be adequate?

I'm not sure.  If NO_GETTEXT is used only to protect '#include <libintl.h>'
it might be enough.

> 
>  config.mak.in |    1 +
>  configure.ac  |    6 ++++++
>  2 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/config.mak.in b/config.mak.in
> index 0d4b64d..a15f3c1 100644
> --- a/config.mak.in
> +++ b/config.mak.in
> @@ -32,6 +32,7 @@ NO_CURL=@NO_CURL@
>  NO_EXPAT=@NO_EXPAT@
>  NO_LIBGEN_H=@NO_LIBGEN_H@
>  HAVE_PATHS_H=@HAVE_PATHS_H@
> +NO_GETTEXT=@NO_GETTEXT@
>  NEEDS_LIBICONV=@NEEDS_LIBICONV@
>  NEEDS_SOCKET=@NEEDS_SOCKET@
>  NEEDS_RESOLV=@NEEDS_RESOLV@

O.K.

> diff --git a/configure.ac b/configure.ac
> index 71038fc..7bebfd8 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -730,6 +730,12 @@ AC_CHECK_HEADER([paths.h],
>  [HAVE_PATHS_H=])
>  AC_SUBST(HAVE_PATHS_H)
>  #
> +# Define NO_GETTEXT if you don't have libintl.h
> +AC_CHECK_HEADER([libintl.h],
> +[NO_GETTEXT=],
> +[NO_GETTEXT=YesPlease])
> +AC_SUBST(NO_GETTEXT)
> +#
>  # Define NO_STRCASESTR if you don't have strcasestr.
>  GIT_CHECK_FUNC(strcasestr,
>  [NO_STRCASESTR=],

The getext documentation says that `gettext.m4' defines AM_GNU_GETTEXT
macro that tests for the presence of GNU gettext function family.

The complication is that `gettext.m4' might not exist, and then
AM_GNU_GETTEXT would be not defined.  So if we are to use
AM_GNU_GETTEXT, we should I guess protect it with m4_ifdef():

  m4_ifdef([AM_GNU_GETTEXT], [AM_GNU_GETTEXT([external])])

or something like that.  And of course we need to work around the fact
that AM_GNU_GETTEXT sets USE_NLS to either 'yes' or 'no' instead of
setting setting NO_GETTEXT to either non-empty or empty value.

Or we can do something similar to what we do for NEEDS_LIBICINV /
NO_ICONV, namely make ./configure compile simple test program using
gettext.

Cc-ed Ben Walton and David M. Syzdek: perhaps they can help with this
issue.
-- 
Jakub Narebski
Poland

  reply	other threads:[~2010-06-01 21:20 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-29 22:45 [PATCH/RFC 0/5] Add internationalization support to Git Ævar Arnfjörð Bjarmason
2010-05-29 22:45 ` [PATCH 1/5] Add infrastructure for translating Git with gettext Ævar Arnfjörð Bjarmason
2010-05-29 22:45 ` [PATCH 2/5] gitignore: Ignore files generated by gettext Ævar Arnfjörð Bjarmason
2010-05-29 22:45 ` [PATCH 3/5] Makefile: Remove Gettext files on make clean Ævar Arnfjörð Bjarmason
2010-05-29 22:45 ` [PATCH 4/5] gettext: Add a skeleton po/is.po Ævar Arnfjörð Bjarmason
2010-05-29 22:45 ` [PATCH 5/5] Add infrastructure to make shellscripts translatable Ævar Arnfjörð Bjarmason
2010-05-30  1:46 ` [PATCH/RFC 0/5] Add internationalization support to Git Jonathan Nieder
2010-05-30 16:04   ` Ævar Arnfjörð Bjarmason
2010-05-30 22:23     ` Jonathan Nieder
2010-05-31 12:17       ` Ævar Arnfjörð Bjarmason
2010-05-30 20:54 ` [PATCH/RFC v2 0/6] " Ævar Arnfjörð Bjarmason
2010-05-30 20:54 ` [PATCH/RFC v2 1/6] Add infrastructure for translating Git with gettext Ævar Arnfjörð Bjarmason
2010-06-01 17:01   ` Jakub Narebski
2010-06-01 18:11     ` [PATCH/RCF] autoconf: Check if <libintl.h> exists and set NO_GETTEXT Ævar Arnfjörð Bjarmason
2010-06-01 21:22       ` Jakub Narebski [this message]
2010-05-30 20:54 ` [PATCH/RFC v2 2/6] gitignore: Ignore files generated by gettext Ævar Arnfjörð Bjarmason
2010-05-30 20:54 ` [PATCH/RFC v2 3/6] Makefile: Remove Gettext files on make clean Ævar Arnfjörð Bjarmason
2010-05-30 20:54 ` [PATCH/RFC v2 4/6] gettext: Add a Gettext interface for shell scripts Ævar Arnfjörð Bjarmason
2010-05-30 20:54 ` [PATCH/RFC v2 5/6] gettext: Add a Gettext interface for Perl Ævar Arnfjörð Bjarmason
2010-06-01 17:00   ` Jakub Narebski
2010-06-01 19:06     ` Ævar Arnfjörð Bjarmason
2010-06-02 11:47       ` Jakub Narebski
2010-05-30 20:54 ` [PATCH/RFC v2 6/6] gettext: Add a skeleton po/is.po Ævar Arnfjörð Bjarmason
2010-05-30 21:29   ` Jonathan Nieder
2010-05-30 21:39     ` Jonathan Nieder
2010-05-31 14:17     ` Ævar Arnfjörð Bjarmason
2010-06-01 23:39 ` [PATCH/RFC v3 0/7] Add internationalization support to Git Ævar Arnfjörð Bjarmason
2010-06-02  0:11   ` Ævar Arnfjörð Bjarmason
2010-06-02  1:05     ` [PATCH/RFC v4 " Ævar Arnfjörð Bjarmason
2010-06-02  1:05     ` [PATCH/RFC v4 1/7] Add infrastructure for translating Git with gettext Ævar Arnfjörð Bjarmason
2010-06-02  9:12       ` Peter Krefting
2010-06-02  9:29         ` Ævar Arnfjörð Bjarmason
2010-06-02 10:11           ` Peter Krefting
2010-06-02 10:56             ` Ævar Arnfjörð Bjarmason
2010-06-02 11:31               ` Peter Krefting
2010-06-02  1:05     ` [PATCH/RFC v4 2/7] gettext: Add a Gettext interface for shell scripts Ævar Arnfjörð Bjarmason
2010-06-02  1:06     ` [PATCH/RFC v4 3/7] gettext: Add a Gettext interface for Perl Ævar Arnfjörð Bjarmason
2010-06-02  1:06     ` [PATCH/RFC v4 4/7] Makefile: Don't install Gettext .mo files if NO_GETTEXT Ævar Arnfjörð Bjarmason
2010-06-02  1:06     ` [PATCH/RFC v4 5/7] Makefile: Override --keyword= for all languages Ævar Arnfjörð Bjarmason
2010-06-02  1:06     ` [PATCH/RFC v4 6/7] gettext: Sanity tests for Git's Gettext support Ævar Arnfjörð Bjarmason
2010-06-02  1:06     ` [PATCH/RFC v4 7/7] gettext: Add a skeleton po/is.po Ævar Arnfjörð Bjarmason
2010-06-02  6:32     ` [PATCH/RFC v3 0/7] Add internationalization support to Git Johannes Sixt
2010-06-02 22:33     ` [PATCH/RFC v5 0/2] Add infrastructure for translating Git with gettext Ævar Arnfjörð Bjarmason
2010-06-02 22:33     ` [PATCH/RFC v5 1/2] " Ævar Arnfjörð Bjarmason
2010-06-02 22:33     ` [PATCH/RFC v5 2/2] Add initial C, Shell and Perl gettext translations Ævar Arnfjörð Bjarmason
2010-06-01 23:39 ` [PATCH/RFC v3 1/7] Add infrastructure for translating Git with gettext Ævar Arnfjörð Bjarmason
2010-06-01 23:39 ` [PATCH/RFC v3 2/7] gettext: Add a Gettext interface for shell scripts Ævar Arnfjörð Bjarmason
2010-06-02  6:32   ` Johannes Sixt
2010-06-02  8:53     ` Ævar Arnfjörð Bjarmason
2010-06-02  9:38       ` Johannes Sixt
2010-06-01 23:39 ` [PATCH/RFC v3 3/7] gettext: Add a Gettext interface for Perl Ævar Arnfjörð Bjarmason
2010-06-01 23:39 ` [PATCH/RFC v3 4/7] Makefile: Don't install Gettext .mo files if NO_GETTEXT Ævar Arnfjörð Bjarmason
2010-06-01 23:39 ` [PATCH/RFC v3 5/7] Makefile: Override --keyword= for all languages Ævar Arnfjörð Bjarmason
2010-06-01 23:39 ` [PATCH/RFC v3 6/7] gettext: Basic sanity tests for Git's Gettext support Ævar Arnfjörð Bjarmason
2010-06-02  6:32   ` Johannes Sixt
2010-06-01 23:39 ` [PATCH/RFC v3 7/7] gettext: Add a skeleton po/is.po Ævar Arnfjörð Bjarmason

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=201006012322.24899.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=avarab@gmail.com \
    --cc=bwalton@artsci.utoronto.ca \
    --cc=david.syzdek@acsalaska.net \
    --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.
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).