Skip to content

Commit

Permalink
Merge branch 'js/configure-libintl'
Browse files Browse the repository at this point in the history
* js/configure-libintl:
  configure: don't use -lintl when there is no gettext support
  • Loading branch information
gitster committed Feb 23, 2012
2 parents bba6123 + a8356d4 commit ef8adca
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +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])
Expand Down Expand Up @@ -824,13 +835,6 @@ 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],
Expand Down

0 comments on commit ef8adca

Please sign in to comment.