You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2014/03/26 16:15:35 UTC

svn commit: r1581882 - /subversion/trunk/configure.ac

Author: stsp
Date: Wed Mar 26 15:15:34 2014
New Revision: 1581882

URL: http://svn.apache.org/r1581882
Log:
Repeat the change made in r1577223, this time also tested on Linux.

Add libintl linker flags to SVN_INTL_LIBS on *nix builds.
Fixes linker flags recorded in libsvn_subr's pkg-config file
which never mentioned -lintl even if required.

* Makefile.in: Define SVN_INTL_LIBS.

* configure.ac: Set SVN_INTL_LIBS to the linker flags required
   to link to libintl and export the value of SVN_INTL_LIBS
   to the Makefile.

Modified:
    subversion/trunk/configure.ac

Modified: subversion/trunk/configure.ac
URL: http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1581882&r1=1581881&r2=1581882&view=diff
==============================================================================
--- subversion/trunk/configure.ac (original)
+++ subversion/trunk/configure.ac Wed Mar 26 15:15:34 2014
@@ -684,13 +684,22 @@ 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)
   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 '^-l' >/dev/null
+                      then
+                        SVN_INTL_LIBS="$ac_cv_search_bindtextdomain"
+                      fi
+                   ],
                    [
                     enable_nls="no"
                    ])
@@ -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 '^-l' >/dev/null
+                      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([