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