Skip to content

Commit 43b5c29

Browse files
committed
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)
1 parent c1b6ef1 commit 43b5c29

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

src/auto/configure

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12690,6 +12690,8 @@ $as_echo_n "checking for NLS... " >&6; }
1269012690
if test -f po/Makefile; then
1269112691
have_gettext="no"
1269212692
if test -n "$MSGFMT"; then
12693+
olibs=$LIBS
12694+
LIBS=""
1269312695
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1269412696
/* end confdefs.h. */
1269512697
#include <libintl.h>
@@ -12703,10 +12705,9 @@ gettext("Test");
1270312705
_ACEOF
1270412706
if ac_fn_c_try_link "$LINENO"; then :
1270512707
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works" >&5
12706-
$as_echo "gettext() works" >&6; }; have_gettext="yes"
12708+
$as_echo "gettext() works" >&6; }; have_gettext="yes"; LIBS=$olibs
1270712709
else
12708-
olibs=$LIBS
12709-
LIBS="$LIBS -lintl"
12710+
LIBS="-lintl"
1271012711
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1271112712
/* end confdefs.h. */
1271212713
#include <libintl.h>
@@ -12720,7 +12721,8 @@ gettext("Test");
1272012721
_ACEOF
1272112722
if ac_fn_c_try_link "$LINENO"; then :
1272212723
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() works with -lintl" >&5
12723-
$as_echo "gettext() works with -lintl" >&6; }; have_gettext="yes"
12724+
$as_echo "gettext() works with -lintl" >&6; }; have_gettext="yes";
12725+
LIBS="$olibs -lintl"
1272412726
else
1272512727
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: gettext() doesn't work" >&5
1272612728
$as_echo "gettext() doesn't work" >&6; };

src/configure.in

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3725,6 +3725,9 @@ if test "$MANDEF" = "man -s"; then
37253725
fi
37263726

37273727
dnl Check if gettext() is working and if it needs -lintl
3728+
dnl We take care to base this on an empty LIBS: on some systems libelf would be
3729+
dnl in LIBS and implicitly take along libintl. The final LIBS would then not
3730+
dnl contain libintl, and the link step would fail due to -Wl,--as-needed.
37283731
AC_MSG_CHECKING(--disable-nls argument)
37293732
AC_ARG_ENABLE(nls,
37303733
[ --disable-nls Don't support NLS (gettext()).], ,
@@ -3743,16 +3746,18 @@ if test "$enable_nls" = "yes"; then
37433746
if test -f po/Makefile; then
37443747
have_gettext="no"
37453748
if test -n "$MSGFMT"; then
3749+
olibs=$LIBS
3750+
LIBS=""
37463751
AC_TRY_LINK(
37473752
[#include <libintl.h>],
37483753
[gettext("Test");],
3749-
AC_MSG_RESULT([gettext() works]); have_gettext="yes",
3750-
olibs=$LIBS
3751-
LIBS="$LIBS -lintl"
3754+
AC_MSG_RESULT([gettext() works]); have_gettext="yes"; LIBS=$olibs,
3755+
LIBS="-lintl"
37523756
AC_TRY_LINK(
37533757
[#include <libintl.h>],
37543758
[gettext("Test");],
3755-
AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes",
3759+
AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes";
3760+
LIBS="$olibs -lintl",
37563761
AC_MSG_RESULT([gettext() doesn't work]);
37573762
LIBS=$olibs))
37583763
else

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ static char *(features[]) =
738738

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
94,
741743
/**/
742744
93,
743745
/**/

0 commit comments

Comments
 (0)