diff --git a/configure b/configure index 5463ff9137c..0e61520190b 100755 --- a/configure +++ b/configure @@ -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 +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" diff --git a/configure.ac b/configure.ac index 426389db56b..70185a86b6b 100644 --- a/configure.ac +++ b/configure.ac @@ -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 ],[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,"") diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c index 2349b310725..a72919e340a 100644 --- a/dlls/oleaut32/olepicture.c +++ b/dlls/oleaut32/olepicture.c @@ -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; diff --git a/include/config.h.in b/include/config.h.in index 48c047db980..50b64ef51a2 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -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 header file. */ #undef HAVE_GIF_LIB_H