Robert Shearman : 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.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jul 26 04:22:45 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 68249c10df19541dc2ea62b4b3654426184763dd
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=68249c10df19541dc2ea62b4b3654426184763dd
Author: Robert Shearman <rob at codeweavers.com>
Date: Tue Jul 25 10:36:06 2006 +0100
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.
---
configure | 67 ++++++++++++++++++++++++++++++++++++++++++++
configure.ac | 8 +++++
dlls/oleaut32/olepicture.c | 6 ++--
include/config.h.in | 3 ++
4 files changed, 81 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index 5463ff9..0e61520 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 <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"
diff --git a/configure.ac b/configure.ac
index 426389d..70185a8 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 <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,"")
diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
index 2349b31..a72919e 100644
--- a/dlls/oleaut32/olepicture.c
+++ b/dlls/oleaut32/olepicture.c
@@ -993,7 +993,7 @@ static boolean _jpeg_resync_to_restart(j
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 *g
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 48c047d..50b64ef 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -212,6 +212,9 @@ #undef HAVE_GETTIMEOFDAY
/* 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
More information about the wine-cvs
mailing list