{"thread":{"id":"29662","subject":"[PATCH 1/1] Don't append -lintl when there is no gettext support","startedAt":"2012-02-18T19:38:03Z","lastAt":"2012-02-20T13:40:55Z","messageCount":4,"participants":["John Szakmeister","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":1},"messages":[{"id":"184934","messageId":"1329593884-9999-1-git-send-email-john@szakmeister.net","threadId":"29662","inReplyTo":null,"subject":"[PATCH 0/1] Make libintl in libc detection more robust","fromName":"John Szakmeister","fromEmail":"john@szakmeister.net","sentAt":"2012-02-18T19:38:03Z","receivedAt":"2012-02-18T19:38:03Z","isPatch":true,"sender":{"key":"john@szakmeister.net","avatar":"https://avatars.githubusercontent.com/u/448087?v=4"},"body":"When building the latest release, I noticed that pthreads support\nwas disabled.  It turns out that the libintl in libc support is\nadding \"-lintl\" to LIBS, even though I don't have that library on my\nMac.  This patch fixes the issue by moving the check for libintl.h\ncloser to the checks for libintl in libc, and only adding \"-lintl\"\nwhen NO_GETTEXT is empty.\n\nThis is my first time submitting a patch to git.  I hope I've done\nthings correctly!\n\nJohn Szakmeister (1):\n  Don't append -lintl when there is no gettext support\n\n configure.ac |   20 ++++++++++++--------\n 1 files changed, 12 insertions(+), 8 deletions(-)\n\n-- \n1.7.9.1\n"},{"id":"184933","messageId":"1329593884-9999-2-git-send-email-john@szakmeister.net","threadId":"29662","inReplyTo":"1329593884-9999-1-git-send-email-john@szakmeister.net","subject":"[PATCH 1/1] Don't append -lintl when there is no gettext support","fromName":"John Szakmeister","fromEmail":"john@szakmeister.net","sentAt":"2012-02-18T19:38:04Z","receivedAt":"2012-02-18T19:38:04Z","isPatch":true,"sender":{"key":"john@szakmeister.net","avatar":"https://avatars.githubusercontent.com/u/448087?v=4"},"body":"The check for libintl in a C library incorrectly assumes that if it's\nnot builtin then it must exist externally.  Instead, let's check for\nthe existence of libintl.h first.  If libintl.h exists, and libintl is\nnot in libc, then we append the library.\n\nSigned-off-by: John Szakmeister <john@szakmeister.net>\n---\n configure.ac |   20 ++++++++++++--------\n 1 files changed, 12 insertions(+), 8 deletions(-)\n\ndiff --git a/configure.ac b/configure.ac\nindex 630dbdd..8471f5c 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -640,7 +640,18 @@ AC_CHECK_LIB([c], [gettext],\n [LIBC_CONTAINS_LIBINTL=YesPlease],\n [LIBC_CONTAINS_LIBINTL=])\n AC_SUBST(LIBC_CONTAINS_LIBINTL)\n-test -n \"$LIBC_CONTAINS_LIBINTL\" || LIBS=\"$LIBS -lintl\"\n+\n+#\n+# Define NO_GETTEXT if you don't want Git output to be translated.\n+# A translated Git requires GNU libintl or another gettext implementation\n+AC_CHECK_HEADER([libintl.h],\n+[NO_GETTEXT=],\n+[NO_GETTEXT=YesPlease])\n+AC_SUBST(NO_GETTEXT)\n+\n+if test -z \"$NO_GETTEXT\"; then\n+    test -n \"$LIBC_CONTAINS_LIBINTL\" || LIBS=\"$LIBS -lintl\"\n+fi\n \n ## Checks for header files.\n AC_MSG_NOTICE([CHECKS for header files])\n@@ -824,13 +835,6 @@ AC_CHECK_HEADER([paths.h],\n [HAVE_PATHS_H=])\n AC_SUBST(HAVE_PATHS_H)\n #\n-# Define NO_GETTEXT if you don't want Git output to be translated.\n-# A translated Git requires GNU libintl or another gettext implementation\n-AC_CHECK_HEADER([libintl.h],\n-[NO_GETTEXT=],\n-[NO_GETTEXT=YesPlease])\n-AC_SUBST(NO_GETTEXT)\n-#\n # Define HAVE_LIBCHARSET_H if have libcharset.h\n AC_CHECK_HEADER([libcharset.h],\n [HAVE_LIBCHARSET_H=YesPlease],\n-- \n1.7.9.1\n"},{"id":"184975","messageId":"7vd399nbt2.fsf@alter.siamese.dyndns.org","threadId":"29662","inReplyTo":"1329593884-9999-1-git-send-email-john@szakmeister.net","subject":"Re: [PATCH 0/1] Make libintl in libc detection more robust","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-02-20T08:34:01Z","receivedAt":"2012-02-20T08:34:01Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"John Szakmeister <john@szakmeister.net> writes:\n\n> This is my first time submitting a patch to git.  I hope I've done\n> things correctly!\n\nLooks good, except for the subject line that would have been better to say\nsomething like:\n\n    configure: don't use -lintl when there is no gettext support\n\nI'll tweak the log message and queue.\n\nThanks.\n"},{"id":"184987","messageId":"CAEBDL5WzYFWdnF=pqHq3wc3GRU-pxS6=1Xw8LP=cogck8wYAAg@mail.gmail.com","threadId":"29662","inReplyTo":"7vd399nbt2.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 0/1] Make libintl in libc detection more robust","fromName":"John Szakmeister","fromEmail":"john@szakmeister.net","sentAt":"2012-02-20T13:40:55Z","receivedAt":"2012-02-20T13:40:55Z","isPatch":true,"sender":{"key":"john@szakmeister.net","avatar":"https://avatars.githubusercontent.com/u/448087?v=4"},"body":"On Mon, Feb 20, 2012 at 3:34 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> John Szakmeister <john@szakmeister.net> writes:\n>\n>> This is my first time submitting a patch to git.  I hope I've done\n>> things correctly!\n>\n> Looks good, except for the subject line that would have been better to say\n> something like:\n>\n>    configure: don't use -lintl when there is no gettext support\n\nYou're right, that's much better.  I'll keep your feedback in mind for\nnext time.\n\n> I'll tweak the log message and queue.\n\nThanks Junio!\n\n-John\n"}]}