Skip to content
Snippets Groups Projects
Commit 00cf13a6 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard
Browse files

Autodetect libgif so extension and try to load it.

parent 7d3431ed
No related branches found
No related tags found
No related merge requests found
......@@ -15546,6 +15546,80 @@ cat >>confdefs.h <<_ACEOF
#define SONAME_LIBUNGIF "$ac_cv_lib_soname_ungif"
_ACEOF
fi
echo "$as_me:$LINENO: checking for -lgif soname" >&5
echo $ECHO_N "checking for -lgif soname... $ECHO_C" >&6
if test "${ac_cv_lib_soname_gif+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_get_soname_save_LIBS=$LIBS
LIBS="-lgif $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char DGifOpen ();
int
main ()
{
DGifOpen ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 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'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_soname_gif=`$ac_cv_path_LDD conftest$ac_exeext | grep libgif\\.$LIBEXT | sed "s/^.*\(libgif\.$LIBEXT[^ ]*\).*$/\1/"`
if test "x$ac_cv_lib_soname_gif" = "x"
then
ac_cv_lib_soname_gif="libgif.$LIBEXT"
fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_soname_gif="libgif.$LIBEXT"
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_get_soname_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_soname_gif" >&5
echo "${ECHO_T}$ac_cv_lib_soname_gif" >&6
if test "x$ac_cv_lib_soname_gif" != xNONE
then
cat >>confdefs.h <<_ACEOF
#define SONAME_LIBGIF "$ac_cv_lib_soname_gif"
_ACEOF
fi
fi
 
 
......
......@@ -1028,6 +1028,7 @@ then
WINE_GET_SONAME(curses,waddch)
WINE_GET_SONAME(jpeg,jpeg_start_decompress)
WINE_GET_SONAME(ungif,DGifOpen)
WINE_GET_SONAME(gif,DGifOpen)
fi
......
......@@ -50,9 +50,12 @@
*/
#ifdef HAVE_GIF_LIB_H
# include <gif_lib.h>
#ifndef SONAME_LIBUNGIF
#define SONAME_LIBUNGIF "libungif.so"
#endif
# ifndef SONAME_LIBUNGIF
# define SONAME_LIBUNGIF "libungif.so"
# endif
# ifndef SONAME_LIBGIF
# define SONAME_LIBGIF "libgif.so"
# endif
#endif
#define NONAMELESSUNION
......@@ -903,7 +906,9 @@ struct gifdata {
static void *load_libungif(void)
{
if((libungif_handle = wine_dlopen(SONAME_LIBUNGIF, RTLD_NOW, NULL, 0)) != NULL) {
if(((libungif_handle = wine_dlopen(SONAME_LIBUNGIF, RTLD_NOW, NULL, 0)) != NULL) ||
((libungif_handle = wine_dlopen(SONAME_LIBGIF , RTLD_NOW, NULL, 0)) != NULL)
) {
#define LOAD_FUNCPTR(f) \
if((p##f = wine_dlsym(libungif_handle, #f, NULL, 0)) == NULL) { \
......@@ -1022,7 +1027,7 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
if(!libungif_handle) {
if(!load_libungif()) {
FIXME("Failed reading GIF because unable to find %s\n", SONAME_LIBUNGIF);
FIXME("Failed reading GIF because unable to find %s/%s\n", SONAME_LIBUNGIF, SONAME_LIBGIF);
return E_FAIL;
}
}
......
......@@ -881,6 +881,9 @@
/* Define to the soname of the libfreetype library. */
#undef SONAME_LIBFREETYPE
/* Define to the soname of the libgif library. */
#undef SONAME_LIBGIF
/* Define to the soname of the libGL library. */
#undef SONAME_LIBGL
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment