Hi Iain, > So, indeed, part of this is quite straight forward - we can amend the > Makefile.def > to specify that GCC should use gettext-runtime (it will be used if the > directory is > present, otherwise there will be no intl support). > > The tricky part is that we need to use the runtime ‘uninstalled’, and here is > where > intl is helpful - it provides a ‘config.intl’ that can be sourced via > gettext-sister.m4 > to provide the neccessary configure input to directories that want to use > intl. > > I have hacked a change to gettext-sister.m4 that fishes the same information > out > of gettext-runtime/Makefile (as configured in $build) - obviously this is > going to be > fragile w.r.t different versions of gettext-runtime (so I am not suggesting > this is a > viable patch) - simply something to illustrate what needs to be figured out. > > So - the changes are in Makefile.def and config/gettext-sister.m4 (the patch > includes > the regenerated files for convenience of use). > > I tried this with gettext-0.21 on macOS 10.15 and, AFAICT, it DTRT - but > needs work > to resolve the main point above.
Excellent! Glad to see that you are going ahead so quickly. I have now added the necessary support for this "uninstalled" situation from the gettext side: https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=6f048e30a88282ed6712ce8d6000302fd287daad This is in a form that is maintainable from gettext's side. I believe that with this, you can change these lines from gettext-sister.m4 BUILD_INCLUDED_LIBINTL=`grep BUILD_INCLUDED_LIBINTL ../gettext-runtime/Makefile|sed s/BUILD_INCLUDED_LIBINTL\ =\ //` USE_NLS=`grep USE_NLS ../gettext-runtime/Makefile|sed s/USE_NLS\ =\ //` LIBICONV=`grep ^LIBICONV ../gettext-runtime/Makefile|sed s/LIBICONV\ =\ //` INTL_MACOSX_LIBS=`grep ^INTL_MACOSX_LIBS ../gettext-runtime/Makefile|sed s/INTL_MACOSX_LIBS\ =\ //` XGETTEXT=`grep XGETTEXT ../gettext-runtime/Makefile|sed s/XGETTEXT\ =\ //` GMSGFMT=`grep GMSGFMT ../gettext-runtime/Makefile|sed s/GMSGFMT\ =\ //` POSUB=`grep POSUB ../gettext-runtime/Makefile|sed s/POSUB\ =\ //` LIBINTL="\${top_builddir}/../gettext-runtime/intl/.libs/libintl.a $LIBICONV $INTL_MACOSX_LIBS" INCINTL="-I\${top_builddir}/../gettext-runtime/intl" roughly to this: relative_builddir='${top_builddir}/../gettext-runtime' . ${top_builddir}/../gettext-runtime/uninstalled-config.sh There is also a GCC specific quirk, that I upstreamed into GNU gettext: https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=fdc2bd236a6a62b477c1fca4205df10b0e64266b > P.S. I am slighty surprised that configuring with —disable-java does not > appear to stop > the on-screen popup appearing that tells me I need to install Java to use > this … that > would be an irritation when using this on a headless box. Thanks for reporting this; it should be fixed now, through https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=971dcbdbebb05d7ae8aa6399a0c79442fa996c5c You find a tarball from the current gettext git, that contains all these changes, in https://alpha.gnu.org/gnu/gettext/gettext-20220620.tar.gz . Obviously, the GCC documentation will have to say that all this works only with GNU gettext 0.22 or newer, i.e. after I make the next release. Bruno