On Sat, Jun 5, 2010 at 11:42, Jakub Narebski <jnareb@xxxxxxxxx> wrote: > Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> 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@xxxxxxxxx> >> --- > > [...] >> 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]) # -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html