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