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

Bugs

Modérateur : xcasadmin

dimpase
Messages : 24
Inscription : mer. oct. 24, 2018 9:58 am

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

Message par dimpase » ven. févr. 19, 2021 11:35 pm

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

parisse
Messages : 5344
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

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

Message par parisse » sam. févr. 20, 2021 12:43 pm

OK, I'll try with this line commented. If something bad happens on more common systems, I'll revert that change.

dimpase
Messages : 24
Inscription : mer. oct. 24, 2018 9:58 am

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

Message par dimpase » sam. févr. 20, 2021 6:32 pm

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])

parisse
Messages : 5344
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

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

Message par parisse » sam. févr. 20, 2021 9:12 pm

I have my own implementation of gettext for some systems, like calculators.

Répondre