summaryrefslogtreecommitdiff
path: root/src/configure.in
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-11-17 20:32:54 +0100
committerBram Moolenaar <Bram@vim.org>2013-11-17 20:32:54 +0100
commit49b6a57d19e46258c2b4c7fb71a5e78f6a7840d1 (patch)
tree34c152deb08c513b3fc8f90969f0f19322eb0b2c /src/configure.in
parent9421bdc2cd7cdcd801bcde4d41ea0a2c60b66199 (diff)
downloadvim-git-49b6a57d19e46258c2b4c7fb71a5e78f6a7840d1.tar.gz
updated for version 7.4.094v7.4.094
Problem: Configure may not find that -lint is needed for gettext(). Solution: Check for gettext() with empty $LIBS. (Thomas De Schampheleire)
Diffstat (limited to 'src/configure.in')
-rw-r--r--src/configure.in13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/configure.in b/src/configure.in
index 83d0ea880..9af3f2475 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -3725,6 +3725,9 @@ if test "$MANDEF" = "man -s"; then
fi
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_ARG_ENABLE(nls,
[ --disable-nls Don't support NLS (gettext()).], ,
@@ -3743,16 +3746,18 @@ if test "$enable_nls" = "yes"; then
if test -f po/Makefile; then
have_gettext="no"
if test -n "$MSGFMT"; then
+ olibs=$LIBS
+ LIBS=""
AC_TRY_LINK(
[#include <libintl.h>],
[gettext("Test");],
- AC_MSG_RESULT([gettext() works]); have_gettext="yes",
- olibs=$LIBS
- LIBS="$LIBS -lintl"
+ 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",
+ AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes";
+ LIBS="$olibs -lintl",
AC_MSG_RESULT([gettext() doesn't work]);
LIBS=$olibs))
else