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