Merge branch 'js/configure-libintl'
authorJunio C Hamano <gitster@pobox.com>
Thu, 23 Feb 2012 21:30:04 +0000 (13:30 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 23 Feb 2012 21:30:04 +0000 (13:30 -0800)
* js/configure-libintl:
configure: don't use -lintl when there is no gettext support

1  2 
configure.ac
diff --combined configure.ac
index 24190de616eae048fbd24839259fc8f160c52d21,8471f5c5903292178a5741be62fa566ee0a9e0b2..8bb0f44b489e0e963c70e88d04e5878dd78012d5
@@@ -640,7 -640,18 +640,18 @@@ AC_CHECK_LIB([c], [gettext]
  [LIBC_CONTAINS_LIBINTL=YesPlease],
  [LIBC_CONTAINS_LIBINTL=])
  AC_SUBST(LIBC_CONTAINS_LIBINTL)
- test -n "$LIBC_CONTAINS_LIBINTL" || LIBS="$LIBS -lintl"
+ #
+ # Define NO_GETTEXT if you don't want Git output to be translated.
+ # A translated Git requires GNU libintl or another gettext implementation
+ AC_CHECK_HEADER([libintl.h],
+ [NO_GETTEXT=],
+ [NO_GETTEXT=YesPlease])
+ AC_SUBST(NO_GETTEXT)
+ if test -z "$NO_GETTEXT"; then
+     test -n "$LIBC_CONTAINS_LIBINTL" || LIBS="$LIBS -lintl"
+ fi
  
  ## Checks for header files.
  AC_MSG_NOTICE([CHECKS for header files])
@@@ -824,28 -835,11 +835,21 @@@ AC_CHECK_HEADER([paths.h]
  [HAVE_PATHS_H=])
  AC_SUBST(HAVE_PATHS_H)
  #
- # Define NO_GETTEXT if you don't want Git output to be translated.
- # A translated Git requires GNU libintl or another gettext implementation
- AC_CHECK_HEADER([libintl.h],
- [NO_GETTEXT=],
- [NO_GETTEXT=YesPlease])
- AC_SUBST(NO_GETTEXT)
- #
  # Define HAVE_LIBCHARSET_H if have libcharset.h
  AC_CHECK_HEADER([libcharset.h],
  [HAVE_LIBCHARSET_H=YesPlease],
  [HAVE_LIBCHARSET_H=])
  AC_SUBST(HAVE_LIBCHARSET_H)
 +# Define CHARSET_LIB if libiconv does not export the locale_charset symbol
 +# and libcharset does
 +CHARSET_LIB=
 +AC_CHECK_LIB([iconv], [locale_charset],
 +       [],
 +       [AC_CHECK_LIB([charset], [locale_charset],
 +                     [CHARSET_LIB=-lcharset])
 +       ]
 +)
 +AC_SUBST(CHARSET_LIB)
  #
  # Define NO_STRCASESTR if you don't have strcasestr.
  GIT_CHECK_FUNC(strcasestr,