mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
updated for version 7.4.094
Problem: Configure may not find that -lint is needed for gettext(). Solution: Check for gettext() with empty $LIBS. (Thomas De Schampheleire)
This commit is contained in:
parent
9421bdc2cd
commit
49b6a57d19
10
src/auto/configure
vendored
10
src/auto/configure
vendored
@ -12690,6 +12690,8 @@ $as_echo_n "checking for NLS... " >&6; }
|
|||||||
if test -f po/Makefile; then
|
if test -f po/Makefile; then
|
||||||
have_gettext="no"
|
have_gettext="no"
|
||||||
if test -n "$MSGFMT"; then
|
if test -n "$MSGFMT"; then
|
||||||
|
olibs=$LIBS
|
||||||
|
LIBS=""
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
#include <libintl.h>
|
#include <libintl.h>
|
||||||
@ -12703,10 +12705,9 @@ gettext("Test");
|
|||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
|
||||||
$as_echo "gettext() works" >&6; }; have_gettext="yes"
|
$as_echo "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs
|
||||||
else
|
else
|
||||||
olibs=$LIBS
|
LIBS="-lintl"
|
||||||
LIBS="$LIBS -lintl"
|
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
#include <libintl.h>
|
#include <libintl.h>
|
||||||
@ -12720,7 +12721,8 @@ gettext("Test");
|
|||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
|
||||||
$as_echo "gettext() works with -lintl" >&6; }; have_gettext="yes"
|
$as_echo "gettext() works with -lintl" >&6; }; have_gettext="yes";
|
||||||
|
LIBS="$olibs -lintl"
|
||||||
else
|
else
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
|
||||||
$as_echo "gettext() doesn't work" >&6; };
|
$as_echo "gettext() doesn't work" >&6; };
|
||||||
|
@ -3725,6 +3725,9 @@ if test "$MANDEF" = "man -s"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Check if gettext() is working and if it needs -lintl
|
dnl Check if gettext() is working and if it needs -lintl
|
||||||
|
dnl We take care to base this on an empty LIBS: on some systems libelf would be
|
||||||
|
dnl in LIBS and implicitly take along libintl. The final LIBS would then not
|
||||||
|
dnl contain libintl, and the link step would fail due to -Wl,--as-needed.
|
||||||
AC_MSG_CHECKING(--disable-nls argument)
|
AC_MSG_CHECKING(--disable-nls argument)
|
||||||
AC_ARG_ENABLE(nls,
|
AC_ARG_ENABLE(nls,
|
||||||
[ --disable-nls Don't support NLS (gettext()).], ,
|
[ --disable-nls Don't support NLS (gettext()).], ,
|
||||||
@ -3743,16 +3746,18 @@ if test "$enable_nls" = "yes"; then
|
|||||||
if test -f po/Makefile; then
|
if test -f po/Makefile; then
|
||||||
have_gettext="no"
|
have_gettext="no"
|
||||||
if test -n "$MSGFMT"; then
|
if test -n "$MSGFMT"; then
|
||||||
AC_TRY_LINK(
|
|
||||||
[#include <libintl.h>],
|
|
||||||
[gettext("Test");],
|
|
||||||
AC_MSG_RESULT([gettext() works]); have_gettext="yes",
|
|
||||||
olibs=$LIBS
|
olibs=$LIBS
|
||||||
LIBS="$LIBS -lintl"
|
LIBS=""
|
||||||
AC_TRY_LINK(
|
AC_TRY_LINK(
|
||||||
[#include <libintl.h>],
|
[#include <libintl.h>],
|
||||||
[gettext("Test");],
|
[gettext("Test");],
|
||||||
AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes",
|
AC_MSG_RESULT([gettext() works]); have_gettext="yes"; LIBS=$olibs,
|
||||||
|
LIBS="-lintl"
|
||||||
|
AC_TRY_LINK(
|
||||||
|
[#include <libintl.h>],
|
||||||
|
[gettext("Test");],
|
||||||
|
AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes";
|
||||||
|
LIBS="$olibs -lintl",
|
||||||
AC_MSG_RESULT([gettext() doesn't work]);
|
AC_MSG_RESULT([gettext() doesn't work]);
|
||||||
LIBS=$olibs))
|
LIBS=$olibs))
|
||||||
else
|
else
|
||||||
|
@ -738,6 +738,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
94,
|
||||||
/**/
|
/**/
|
||||||
93,
|
93,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user