[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: -lintl in SVN_INTL_LIBS and LIBS

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Fri, 14 Mar 2014 22:56:48 +0000

Stefan Sperling <stsp_at_elego.de> writes:

> Would something like this work on linux?
>
> I'm now afraid of breaking the build for everyone else with
> changes like these :)

Works on Linux, but please avoid "grep -q" and redirect to >/dev/null
instead.

$ ../src/configure
...
checking for xgettext... /usr/bin/xgettext
checking for library containing bindtextdomain... none required
checking for bind_textdomain_codeset... yes
checking if we are using GNU gettext... yes
...
$ grep INTL Makefile
SVN_INTL_LIBS =
$ grep NLS subversion/svn_private_config.h
#define ENABLE_NLS 1
#ifdef ENABLE_NLS

>
> Index: configure.ac
> ===================================================================
> --- configure.ac (revision 1577708)
> +++ configure.ac (working copy)
> @@ -684,6 +684,7 @@ AC_ARG_ENABLE(nls,
> [enable_nls=$enableval],[enable_nls=yes])
>
> USE_NLS="no"
> +SVN_INTL_LIBS=""
> if test "$enable_nls" = "yes"; then
> dnl First, check to see if there is a working msgfmt.
> AC_PATH_PROG(MSGFMT, msgfmt, none)
> @@ -690,8 +691,16 @@ if test "$enable_nls" = "yes"; then
> AC_PATH_PROG(MSGMERGE, msgmerge, none)
> AC_PATH_PROG(XGETTEXT, xgettext, none)
> if test "$MSGFMT" != "none"; then
> - AC_SEARCH_LIBS(bindtextdomain, [intl], [],
> + AC_SEARCH_LIBS(bindtextdomain, [intl],
> [
> + # in case libintl needs to be linked explicitly,
> + # $ac_cv_search_bindtextdomain contains -l linker flags
> + if echo "$ac_cv_search_bindtextdomain" | grep -q '^-l'
> + then
> + SVN_INTL_LIBS="$ac_cv_search_bindtextdomain"
> + fi
> + ],
> + [
> enable_nls="no"
> ])
> if test "$enable_nls" = "no"; then
> @@ -702,6 +711,10 @@ if test "$enable_nls" = "yes"; then
> AC_SEARCH_LIBS(bindtextdomain, [intl],
> [
> enable_nls="yes"
> + if echo "$ac_cv_search_bindtextdomain" | grep -q '^-l'
> + then
> + SVN_INTL_LIBS="$ac_cv_search_bindtextdomain"
> + fi
> # This is here so that -liconv ends up in LIBS
> # if it worked with -liconv.
> AC_CHECK_LIB(iconv, libiconv_open)
> @@ -720,7 +733,6 @@ if test "$enable_nls" = "yes"; then
> fi
> fi
>
> -dnl Currently SVN_INTL_LIBS is always empty.
> AC_SUBST(SVN_INTL_LIBS)
>
> AH_BOTTOM([
>

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*
Received on 2014-03-14 23:57:21 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.