On Mon, May 13, 2019 at 5:43 PM Michael Orlitzky <mich...@orlitzky.com> wrote:
>
> On 5/13/19 10:04 AM, Dima Pasechnik wrote:
> >
> > We should get an spkg-configure.m4 for libgd, it's really silly to
> > build it everywhere...
> > (I guess that's what Michael is working on :-))
> >
>
> I looked at libgd and saw that we have in-progress tickets for its other
> two dependencies, freetype and libpng, but not for iconv. So I began
> looking at iconv, which is going to be a pain in the ass, because there
> are a few different implementations that need to be detected in
> different ways. For example, we probably have to reproduce all of R's
> iconv feature detection to ensure that we get a satisfactory copy.

Hmm, thank you for pointing that out.  It doesn't look too bad and not
*all* of it needs to be reproduced, but some of it yes.

The tricky thing about iconv is that sometimes it's built into libc
and sometimes it's a separate library that needs to be linked with
-liconv.  And furthermore, (especially in the former case) sometimes
iconv is a macro, and sometimes it's a function.

There's actually a standard AM_ICONV that apparently handles all these
cases: https://www.gnu.org/software/gettext/manual/html_node/AM_005fICONV.html
 In fact, looking at the /usr/share/aclocal/iconv.m4 on my system, it
looks like R borrowed its check from this.

The other thing R checks which is more specific to R is that it
requires iconv to support (as most any will these days) UTF-8, ASCII,
latin-1, and UCS-* encodings.  I think we could probably safely just
assume that for any platforms Sage supports, but if you want to be
extra sure I could easily replicate that check as well.

> As a lazy person, that immediately lead me to ask the question: could I
> just... ignore iconv... and work on libgd anyway? The iconv detection in
> libgd is automagic, so we would have to force-disable the iconv support
> somehow, but I don't think libgd would be any worse for it.

Sure! As far as implementing an spkg-configure.m4, at least initially,
it doesn't look like there needs to be a deep interaction here.  If we
do find something later we can add it on.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAOTD34ZrgYOiOCie_-EeEzXYMkb%3D5jOR%3DWsgM1xQUYz4BozDBQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to