Skip to content

Commit f832bcc

Browse files
committed
Merge branch 'vk/autoconf-gettext'
The autoconf generated configure script failed to use the right gettext() implementations from -libintl by ignoring useless stub implementations shipped in some C library, which has been corrected. * vk/autoconf-gettext: autoconf: #include <libintl.h> when checking for gettext()
2 parents 1ff440f + b71e56a commit f832bcc

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

configure.ac

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -763,9 +763,19 @@ AC_CHECK_LIB([c], [basename],
763763
GIT_CONF_SUBST([NEEDS_LIBGEN])
764764
test -n "$NEEDS_LIBGEN" && LIBS="$LIBS -lgen"
765765

766-
AC_CHECK_LIB([c], [gettext],
767-
[LIBC_CONTAINS_LIBINTL=YesPlease],
768-
[LIBC_CONTAINS_LIBINTL=])
766+
AC_DEFUN([LIBINTL_SRC], [
767+
AC_LANG_PROGRAM([[
768+
#include <libintl.h>
769+
]],[[
770+
char *msg = gettext("test");
771+
]])])
772+
773+
AC_MSG_CHECKING([if libc contains libintl])
774+
AC_LINK_IFELSE([LIBINTL_SRC],
775+
[AC_MSG_RESULT([yes])
776+
LIBC_CONTAINS_LIBINTL=YesPlease],
777+
[AC_MSG_RESULT([no])
778+
LIBC_CONTAINS_LIBINTL=])
769779
GIT_CONF_SUBST([LIBC_CONTAINS_LIBINTL])
770780

771781
#

0 commit comments

Comments
 (0)