Page 1 sur 1

do not use AC_CHECK_LIB(intl, main) in configure.ac

Publié : ven. févr. 19, 2021 11:35 pm
par dimpase
if ./configure is given --disable-nls, it should not try to link libintl, otherwise,if one has an incompatiple system libntl (like on Solaris),
it is linked in, but then libgiac.so gets undefined symbols.

It seems that this macro is just not needed, and everything needed here is done by AM_GNU_GETTEXT* macros.
Indeed, the latter create LIBINTL and LTLIBINTL with the libraries needed, see
https://www.gnu.org/software/gettext/ma ... onf-macros

Otherwise the only way seems to patch ./configure and to intentionally break the AC_CHECK_LIB(intl, main)
(e.g. by replacing main() by something silly in the source of the test program.)

Dima

Re: do not use AC_CHECK_LIB(intl, main) in configure.ac

Publié : sam. févr. 20, 2021 12:43 pm
par parisse
OK, I'll try with this line commented. If something bad happens on more common systems, I'll revert that change.

Re: do not use AC_CHECK_LIB(intl, main) in configure.ac

Publié : sam. févr. 20, 2021 6:32 pm
par dimpase
I am actually not sure how exactly gettext is used in giac.
Is the idea to build its own libintl in case the one from the system is not available?

If so, this does not seem to work (for some reason).

If not, and libintl must always come from the system,
configure.ac needs a slightly different way to call AM_GNU_GETTEXT,namely
AM_GNU_GETTEXT([external])

Re: do not use AC_CHECK_LIB(intl, main) in configure.ac

Publié : sam. févr. 20, 2021 9:12 pm
par parisse
I have my own implementation of gettext for some systems, like calculators.