[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] build: Fix build with gettext 0.20.1
From: |
Jose E. Marchesi |
Subject: |
Re: [PATCH] build: Fix build with gettext 0.20.1 |
Date: |
Tue, 25 Feb 2020 09:48:04 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hi Eric.
While the gnulib libtextstyle replacement compiled fine, Fedora 31's
libtextstyle-devel from gettext 0.20.1 lacks the hyperlink support
added upstream in gettext 0.21, causing:
pk-term.c: In function 'pk_term_init':
pk-term.c:75:21: error: lvalue required as left operand of assignment
75 | style_file_name = NULL;
Hmm, even if the libtextstyle-devel library found in the system doesn't
support hyperlinks, I would expect for style_file_name to not be
replaced by gnulib.
This is the relevant macro in m4/libtextstyle-optional.m4:
AC_DEFUN([gl_LIBTEXTSTYLE_OPTIONAL],
[
AC_REQUIRE([gl_LIBTEXTSTYLE])
if test $HAVE_LIBTEXTSTYLE = yes; then
TEXTSTYLE_H=
else
TEXTSTYLE_H=textstyle.h
AC_REQUIRE([AC_C_INLINE])
AC_CHECK_FUNCS_ONCE([tcdrain])
fi
AC_SUBST([TEXTSTYLE_H])
AM_CONDITIONAL([GL_GENERATE_TEXTSTYLE_H], [test -n "$TEXTSTYLE_H"])
])
And in turn:
AC_DEFUN([gl_LIBTEXTSTYLE],
[
AC_LIB_HAVE_LINKFLAGS([textstyle], [],
[#include <textstyle.h>],
[term_styled_ostream_create(1,"",TTYCTL_AUTO,"");],
[no])
])
Note how gl_LIBTEXTSTYLE doesn't depend on the availability of
hyperlinks. It is the textstyle.h provided by gl_LIBTEXTSTYLE_OPTIONAL
that #defines style_file_name to NULL...