Hmm, this seems weird, I looked into the config.log after running configure, but the tests for libgif already do fail when using the wrong library version (DGifOpen (); is missing; it reads:
configure:15519: checking for -lungif soname configure:15549: gcc -o conftest -g -O2 conftest.c -lungif >&5 /tmp/ccie7Kbp.o(.text+0xa): In function `main': /home/jorishuizer/.wine-source/wine/conftest.c:176: undefined reference to `DGifOpen' collect2: ld returned 1 exit status configure:15555: $? = 1 configure: failed program was: ... configure:15584: result: libungif.so
This is a result of the dynamically loaded libungif.so / libgif.so, it expects that it has this symbol.
So exactly what distro has this problem, all modern ones should not have it.
Ciao, Marcus