Allow using a system-installed giflib

Omair Majid omajid at
Thu Mar 14 20:40:40 UTC 2013

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 :(

>     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"

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.


PGP Key: 66484681 (
Fingerprint = F072 555B 0A17 3957 4E95  0056 F286 F14F 6648 4681

More information about the build-dev mailing list