Allow using a system-installed giflib

Andrew Hughes gnu.andrew at redhat.com
Fri Mar 15 03:00:55 UTC 2013


----- Original Message -----
> Hi Andrew,
> 
> On 03/13/2013 05:08 AM, Andrew Hughes wrote:
> > Given this is essentially a binary option (system giflib or bundled
> > giflib),
> > why is AC_ARG_ENABLE not being used instead of AC_ARG_WITH?  It
> > would simplify
> > the logic here and is what we use in the equivalent IcedTea check
> > which has
> > been in production use for almost two years.
> 
> My goal was to minimize change. The larger the change, the harder it
> is
> for it to be accepted in OpenJDK :(

Right, but I think a stronger case can be made for a change if it's been
well-tested.  Also, I don't think there's really much difference in size
here.  It just uses a different form to the existing zlib one.  As I said
before, there's also an issue with it testing for the system library when the
bundled copy has been requested.

I can however propose a patch following this to fix the two options
(zlib & this).  Just don't go and submit any more in this form.

> 
> >     AC_CHECK_HEADER([gif_lib.h],
> >         , [AC_MSG_ERROR([Could not find GIF header; install GIF or
> >         build with --disable-system-gif to use the in-tree
> >         copy.])])
> >     GIF_LIBS="-lgif"
> >     AC_SUBST(GIF_LIBS)
> 
> My patch does not make use of the system headers. I should fix that
> next.
> 
> > Was there a reason to change main to DGifGetCode?
> 
> No, it just seemed the right thing to do based on the autoconf
> docmentaton on AC_CHECK_LIB, which said that the /function/ should be
> part of the library we are testing for.
> 
> > It seems a better choice, assuming that symbol
> > is available in all versions, but I'm just wondering if a problem
> > with using main was exposed.
> 
> DGifGetCode is present in giflib 4.1.3 (May 2004). It's not mentioned
> in
> the NEWS file or the ONEWS file of that release, which makes me
> suspect
> that it has been part of the API for a long time.
> 
> And no, there was no problem with using "main", it just seemed wrong.
> 

I agree it's better.  I would why main was used to begin with.

> Thanks,
> Omair
> 
> --
> PGP Key: 66484681 (http://pgp.mit.edu/)
> Fingerprint = F072 555B 0A17 3957 4E95  0056 F286 F14F 6648 4681
> 

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07




More information about the build-dev mailing list