configure: Add a check for the DGifOpen function in the gif_lib.h header as the v4 of the file does define it, while v3 doesn't.

oldstable
Robert Shearman 2006-07-25 10:36:06 +01:00 committed by Alexandre Julliard
parent bb310d5486
commit 68249c10df
4 changed files with 81 additions and 3 deletions

67
configure vendored
View File

@ -14947,6 +14947,73 @@ fi
fi
if test "$ac_cv_header_gif_lib_h" = "yes"
then
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <gif_lib.h>
int
main ()
{
static typeof(DGifOpen) * func;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_GIF 1
_ACEOF
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
EXTRACFLAGS=""
if test "x${GCC}" = "xyes"

View File

@ -880,6 +880,14 @@ then
AC_CHECK_LIB(capi20,capi20_register,[AC_DEFINE(HAVE_CAPI4LINUX,1,[Define if you have capi4linux libs and headers])])
fi
dnl **** Check for gif header usability ****
if test "$ac_cv_header_gif_lib_h" = "yes"
then
AC_TRY_COMPILE([#include <gif_lib.h>],[static typeof(DGifOpen) * func;],
AC_DEFINE(HAVE_GIF, 1, [Define if you have usable GIF headers]))
fi
dnl **** Check for gcc specific options ****
AC_SUBST(EXTRACFLAGS,"")

View File

@ -993,7 +993,7 @@ static boolean _jpeg_resync_to_restart(j_decompress_ptr cinfo, int desired) {
static void _jpeg_term_source(j_decompress_ptr cinfo) { }
#endif /* HAVE_JPEGLIB_H */
#ifdef HAVE_GIF_LIB_H
#ifdef HAVE_GIF
static void *libungif_handle;
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
@ -1040,12 +1040,12 @@ static int _gif_inputfunc(GifFileType *gif, GifByteType *data, int len) {
return len;
}
#endif /* HAVE_GIF_LIB_H */
#endif /* HAVE_GIF */
static HRESULT OLEPictureImpl_LoadGif(OLEPictureImpl *This, BYTE *xbuf, ULONG xread)
{
#ifdef HAVE_GIF_LIB_H
#ifdef HAVE_GIF
struct gifdata gd;
GifFileType *gif;
BITMAPINFO *bmi;

View File

@ -212,6 +212,9 @@
/* Define to 1 if you have the `getuid' function. */
#undef HAVE_GETUID
/* Define if you have usable GIF headers */
#undef HAVE_GIF
/* Define to 1 if you have the <gif_lib.h> header file. */
#undef HAVE_GIF_LIB_H