Blame SOURCES/7.4.094

22c937
To: vim_dev@googlegroups.com
22c937
Subject: Patch 7.4.094
22c937
Fcc: outbox
22c937
From: Bram Moolenaar <Bram@moolenaar.net>
22c937
Mime-Version: 1.0
22c937
Content-Type: text/plain; charset=UTF-8
22c937
Content-Transfer-Encoding: 8bit
22c937
------------
22c937
22c937
Patch 7.4.094
22c937
Problem:    Configure may not find that -lint is needed for gettext().
22c937
Solution:   Check for gettext() with empty $LIBS.  (Thomas De Schampheleire)
22c937
Files:	    src/configure.in, src/auto/configure
22c937
22c937
22c937
*** ../vim-7.4.093/src/configure.in	2013-11-17 20:17:05.000000000 +0100
22c937
--- src/configure.in	2013-11-17 20:23:49.000000000 +0100
22c937
***************
22c937
*** 3725,3730 ****
22c937
--- 3725,3733 ----
22c937
  fi
22c937
  
22c937
  dnl Check if gettext() is working and if it needs -lintl
22c937
+ dnl We take care to base this on an empty LIBS: on some systems libelf would be
22c937
+ dnl in LIBS and implicitly take along libintl. The final LIBS would then not
22c937
+ dnl contain libintl, and the link step would fail due to -Wl,--as-needed.
22c937
  AC_MSG_CHECKING(--disable-nls argument)
22c937
  AC_ARG_ENABLE(nls,
22c937
  	[  --disable-nls           Don't support NLS (gettext()).], ,
22c937
***************
22c937
*** 3743,3758 ****
22c937
    if test -f po/Makefile; then
22c937
      have_gettext="no"
22c937
      if test -n "$MSGFMT"; then
22c937
        AC_TRY_LINK(
22c937
  	[#include <libintl.h>],
22c937
  	[gettext("Test");],
22c937
! 	AC_MSG_RESULT([gettext() works]); have_gettext="yes",
22c937
! 	  olibs=$LIBS
22c937
! 	  LIBS="$LIBS -lintl"
22c937
  	  AC_TRY_LINK(
22c937
  	      [#include <libintl.h>],
22c937
  	      [gettext("Test");],
22c937
! 	      AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes",
22c937
  	      AC_MSG_RESULT([gettext() doesn't work]);
22c937
  	      LIBS=$olibs))
22c937
      else
22c937
--- 3746,3763 ----
22c937
    if test -f po/Makefile; then
22c937
      have_gettext="no"
22c937
      if test -n "$MSGFMT"; then
22c937
+       olibs=$LIBS
22c937
+       LIBS=""
22c937
        AC_TRY_LINK(
22c937
  	[#include <libintl.h>],
22c937
  	[gettext("Test");],
22c937
! 	AC_MSG_RESULT([gettext() works]); have_gettext="yes"; LIBS=$olibs,
22c937
! 	  LIBS="-lintl"
22c937
  	  AC_TRY_LINK(
22c937
  	      [#include <libintl.h>],
22c937
  	      [gettext("Test");],
22c937
! 	      AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes";
22c937
! 	      LIBS="$olibs -lintl",
22c937
  	      AC_MSG_RESULT([gettext() doesn't work]);
22c937
  	      LIBS=$olibs))
22c937
      else
22c937
*** ../vim-7.4.093/src/auto/configure	2013-11-17 20:17:05.000000000 +0100
22c937
--- src/auto/configure	2013-11-17 20:25:13.000000000 +0100
22c937
***************
22c937
*** 12690,12695 ****
22c937
--- 12690,12697 ----
22c937
    if test -f po/Makefile; then
22c937
      have_gettext="no"
22c937
      if test -n "$MSGFMT"; then
22c937
+       olibs=$LIBS
22c937
+       LIBS=""
22c937
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22c937
  /* end confdefs.h.  */
22c937
  #include <libintl.h>
22c937
***************
22c937
*** 12703,12712 ****
22c937
  _ACEOF
22c937
  if ac_fn_c_try_link "$LINENO"; then :
22c937
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
22c937
! $as_echo "gettext() works" >&6; }; have_gettext="yes"
22c937
  else
22c937
!   olibs=$LIBS
22c937
! 	  LIBS="$LIBS -lintl"
22c937
  	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22c937
  /* end confdefs.h.  */
22c937
  #include <libintl.h>
22c937
--- 12705,12713 ----
22c937
  _ACEOF
22c937
  if ac_fn_c_try_link "$LINENO"; then :
22c937
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
22c937
! $as_echo "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs
22c937
  else
22c937
!   LIBS="-lintl"
22c937
  	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22c937
  /* end confdefs.h.  */
22c937
  #include <libintl.h>
22c937
***************
22c937
*** 12720,12726 ****
22c937
  _ACEOF
22c937
  if ac_fn_c_try_link "$LINENO"; then :
22c937
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
22c937
! $as_echo "gettext() works with -lintl" >&6; }; have_gettext="yes"
22c937
  else
22c937
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
22c937
  $as_echo "gettext() doesn't work" >&6; };
22c937
--- 12721,12728 ----
22c937
  _ACEOF
22c937
  if ac_fn_c_try_link "$LINENO"; then :
22c937
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
22c937
! $as_echo "gettext() works with -lintl" >&6; }; have_gettext="yes";
22c937
! 	      LIBS="$olibs -lintl"
22c937
  else
22c937
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
22c937
  $as_echo "gettext() doesn't work" >&6; };
22c937
*** ../vim-7.4.093/src/version.c	2013-11-17 20:17:05.000000000 +0100
22c937
--- src/version.c	2013-11-17 20:27:43.000000000 +0100
22c937
***************
22c937
*** 740,741 ****
22c937
--- 740,743 ----
22c937
  {   /* Add new patch number below this line */
22c937
+ /**/
22c937
+     94,
22c937
  /**/
22c937
22c937
-- 
22c937
BLACK KNIGHT: The Black Knight always triumphs. Have at you!
22c937
   ARTHUR takes his last leg off.  The BLACK KNIGHT's body lands upright.
22c937
BLACK KNIGHT: All right, we'll call it a draw.
22c937
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
22c937
22c937
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
22c937
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
22c937
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
22c937
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///