dlopen libungif and libjpeg.

This commit is contained in:
Huw Davies 2004-08-04 19:10:26 +00:00 committed by Alexandre Julliard
parent b5b8810e99
commit e82dfab20f
5 changed files with 282 additions and 584 deletions

706
configure vendored
View File

@ -311,7 +311,7 @@ ac_includes_default="\
# include <unistd.h> # include <unistd.h>
#endif" #endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS WIN16_FILES WIN16_INSTALL build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPPBIN ac_ct_CPPBIN TOOLSDIR CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LEX LEXLIB LEX_OUTPUT_ROOT XLEX BISON AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP WINDRES ac_ct_WINDRES LN_S LN LDCONFIG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINT LINTFLAGS DB2HTML DB2PDF DB2PS DB2TXT LIBPTHREAD JPEGLIB EGREP GIFLIB XLIB XFILES OPENGLFILES GLU32FILES OPENGL_LIBS GLUT_LIBS GLUT32FILES NASLIBS CURSESLIBS sane_devel SANELIBS SANEINCL ICULIBS ft_devel ft_devel2 FREETYPEINCL ARTSCCONFIG ARTSLIBS ARTSINCL ALSALIBS AUDIOIOLIBS CAPI4LINUXLIBS EXTRACFLAGS DLLEXT DLLFLAGS DLLIBS LDSHARED LDDLLFLAGS LIBEXT IMPLIBEXT DLLTOOL ac_ct_DLLTOOL DLLWRAP ac_ct_DLLWRAP LDEXECFLAGS LDLIBWINEFLAGS CROSSTEST CROSSCC CROSSWINDRES LDPATH CRTLIBS WINE_BINARIES MAIN_BINARY LDD ALLOCA LIBOBJS LTLIBOBJS' ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS WIN16_FILES WIN16_INSTALL build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPPBIN ac_ct_CPPBIN TOOLSDIR CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LEX LEXLIB LEX_OUTPUT_ROOT XLEX BISON AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP WINDRES ac_ct_WINDRES LN_S LN LDCONFIG INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LINT LINTFLAGS DB2HTML DB2PDF DB2PS DB2TXT LIBPTHREAD XLIB XFILES OPENGLFILES GLU32FILES OPENGL_LIBS EGREP GLUT_LIBS GLUT32FILES NASLIBS CURSESLIBS sane_devel SANELIBS SANEINCL ICULIBS ft_devel ft_devel2 FREETYPEINCL ARTSCCONFIG ARTSLIBS ARTSINCL ALSALIBS AUDIOIOLIBS CAPI4LINUXLIBS EXTRACFLAGS DLLEXT DLLFLAGS DLLIBS LDSHARED LDDLLFLAGS LIBEXT IMPLIBEXT DLLTOOL ac_ct_DLLTOOL DLLWRAP ac_ct_DLLWRAP LDEXECFLAGS LDLIBWINEFLAGS CROSSTEST CROSSCC CROSSWINDRES LDPATH CRTLIBS WINE_BINARIES MAIN_BINARY LDD ALLOCA LIBOBJS LTLIBOBJS'
ac_subst_files='MAKE_RULES MAKE_DLL_RULES MAKE_TEST_RULES MAKE_LIB_RULES MAKE_PROG_RULES' ac_subst_files='MAKE_RULES MAKE_DLL_RULES MAKE_TEST_RULES MAKE_LIB_RULES MAKE_PROG_RULES'
# Initialize some variables set by options. # Initialize some variables set by options.
@ -6868,7 +6868,20 @@ if test $ac_cv_lib_pthread_pthread_create = yes; then
fi fi
JPEGLIB=""
XFILES=""
OPENGLFILES=""
GLU32FILES=""
OPENGL_LIBS=""
if test "$have_x" = "yes"
then
XLIB="-lXext -lX11"
ac_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
echo "$as_me:$LINENO: checking for egrep" >&5 echo "$as_me:$LINENO: checking for egrep" >&5
echo $ECHO_N "checking for egrep... $ECHO_C" >&6 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
@ -7122,539 +7135,6 @@ done
for ac_header in jpeglib.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
# Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
{ (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_objext'
{ (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_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## ------------------------------------ ##
## Report this to wine-devel@winehq.org ##
## ------------------------------------ ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
echo "$as_me:$LINENO: checking for jpeg_start_decompress in -ljpeg" >&5
echo $ECHO_N "checking for jpeg_start_decompress in -ljpeg... $ECHO_C" >&6
if test "${ac_cv_lib_jpeg_jpeg_start_decompress+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ljpeg $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 jpeg_start_decompress ();
int
main ()
{
jpeg_start_decompress ();
;
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_jpeg_jpeg_start_decompress=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_jpeg_jpeg_start_decompress=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_decompress" >&5
echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_decompress" >&6
if test $ac_cv_lib_jpeg_jpeg_start_decompress = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBJPEG 1
_ACEOF
JPEGLIB="-ljpeg"
fi
fi
done
GIFLIB=""
for ac_header in gif_lib.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
# Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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'
{ (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_objext'
{ (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_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## ------------------------------------ ##
## Report this to wine-devel@winehq.org ##
## ------------------------------------ ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
echo "$as_me:$LINENO: checking for DGifOpen in -lungif" >&5
echo $ECHO_N "checking for DGifOpen in -lungif... $ECHO_C" >&6
if test "${ac_cv_lib_ungif_DGifOpen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lungif $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_ungif_DGifOpen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_ungif_DGifOpen=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_DGifOpen" >&5
echo "${ECHO_T}$ac_cv_lib_ungif_DGifOpen" >&6
if test $ac_cv_lib_ungif_DGifOpen = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBGIF 1
_ACEOF
GIFLIB="-lungif"
else
echo "$as_me:$LINENO: checking for DGifOpen in -lgif" >&5
echo $ECHO_N "checking for DGifOpen in -lgif... $ECHO_C" >&6
if test "${ac_cv_lib_gif_DGifOpen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_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_gif_DGifOpen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_gif_DGifOpen=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_gif_DGifOpen" >&5
echo "${ECHO_T}$ac_cv_lib_gif_DGifOpen" >&6
if test $ac_cv_lib_gif_DGifOpen = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_LIBGIF 1
_ACEOF
GIFLIB="-lgif"
fi
fi
fi
done
XFILES=""
OPENGLFILES=""
GLU32FILES=""
OPENGL_LIBS=""
if test "$have_x" = "yes"
then
XLIB="-lXext -lX11"
ac_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
for ac_header in X11/Xlib.h for ac_header in X11/Xlib.h
do do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@ -15863,6 +15343,154 @@ cat >>confdefs.h <<_ACEOF
#define SONAME_LIBCURSES "$ac_cv_lib_soname_curses" #define SONAME_LIBCURSES "$ac_cv_lib_soname_curses"
_ACEOF _ACEOF
fi fi
echo "$as_me:$LINENO: checking for -ljpeg soname" >&5
echo $ECHO_N "checking for -ljpeg soname... $ECHO_C" >&6
if test "${ac_cv_lib_soname_jpeg+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_get_soname_save_LIBS=$LIBS
LIBS="-ljpeg $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 jpeg_start_decompress ();
int
main ()
{
jpeg_start_decompress ();
;
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_jpeg=`$ac_cv_path_LDD conftest$ac_exeext | grep libjpeg\\.$LIBEXT | sed "s/^.*\(libjpeg\.$LIBEXT[^ ]*\).*$/\1/"`
if test "x$ac_cv_lib_soname_jpeg" = "x"
then
ac_cv_lib_soname_jpeg="libjpeg.$LIBEXT"
fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_soname_jpeg="libjpeg.$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_jpeg" >&5
echo "${ECHO_T}$ac_cv_lib_soname_jpeg" >&6
if test "x$ac_cv_lib_soname_jpeg" != xNONE
then
cat >>confdefs.h <<_ACEOF
#define SONAME_LIBJPEG "$ac_cv_lib_soname_jpeg"
_ACEOF
fi
echo "$as_me:$LINENO: checking for -lungif soname" >&5
echo $ECHO_N "checking for -lungif soname... $ECHO_C" >&6
if test "${ac_cv_lib_soname_ungif+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_get_soname_save_LIBS=$LIBS
LIBS="-lungif $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_ungif=`$ac_cv_path_LDD conftest$ac_exeext | grep libungif\\.$LIBEXT | sed "s/^.*\(libungif\.$LIBEXT[^ ]*\).*$/\1/"`
if test "x$ac_cv_lib_soname_ungif" = "x"
then
ac_cv_lib_soname_ungif="libungif.$LIBEXT"
fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_soname_ungif="libungif.$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_ungif" >&5
echo "${ECHO_T}$ac_cv_lib_soname_ungif" >&6
if test "x$ac_cv_lib_soname_ungif" != xNONE
then
cat >>confdefs.h <<_ACEOF
#define SONAME_LIBUNGIF "$ac_cv_lib_soname_ungif"
_ACEOF
fi
fi fi
@ -16522,6 +16150,8 @@ done
@ -16534,9 +16164,11 @@ for ac_header in \
float.h \ float.h \
fontconfig/fontconfig.h \ fontconfig/fontconfig.h \
getopt.h \ getopt.h \
gif_lib.h \
ieeefp.h \ ieeefp.h \
io.h \ io.h \
jack/jack.h \ jack/jack.h \
jpeglib.h \
libio.h \ libio.h \
libutil.h \ libutil.h \
link.h \ link.h \
@ -21202,14 +20834,12 @@ s,@DB2PDF@,$DB2PDF,;t t
s,@DB2PS@,$DB2PS,;t t s,@DB2PS@,$DB2PS,;t t
s,@DB2TXT@,$DB2TXT,;t t s,@DB2TXT@,$DB2TXT,;t t
s,@LIBPTHREAD@,$LIBPTHREAD,;t t s,@LIBPTHREAD@,$LIBPTHREAD,;t t
s,@JPEGLIB@,$JPEGLIB,;t t
s,@EGREP@,$EGREP,;t t
s,@GIFLIB@,$GIFLIB,;t t
s,@XLIB@,$XLIB,;t t s,@XLIB@,$XLIB,;t t
s,@XFILES@,$XFILES,;t t s,@XFILES@,$XFILES,;t t
s,@OPENGLFILES@,$OPENGLFILES,;t t s,@OPENGLFILES@,$OPENGLFILES,;t t
s,@GLU32FILES@,$GLU32FILES,;t t s,@GLU32FILES@,$GLU32FILES,;t t
s,@OPENGL_LIBS@,$OPENGL_LIBS,;t t s,@OPENGL_LIBS@,$OPENGL_LIBS,;t t
s,@EGREP@,$EGREP,;t t
s,@GLUT_LIBS@,$GLUT_LIBS,;t t s,@GLUT_LIBS@,$GLUT_LIBS,;t t
s,@GLUT32FILES@,$GLUT32FILES,;t t s,@GLUT32FILES@,$GLUT32FILES,;t t
s,@NASLIBS@,$NASLIBS,;t t s,@NASLIBS@,$NASLIBS,;t t

View File

@ -145,24 +145,6 @@ AC_CHECK_LIB(resolv,res_9_init)
dnl Check for -lpthread dnl Check for -lpthread
AC_CHECK_LIB(pthread,pthread_create,AC_SUBST(LIBPTHREAD,"-lpthread")) AC_CHECK_LIB(pthread,pthread_create,AC_SUBST(LIBPTHREAD,"-lpthread"))
JPEGLIB=""
AC_SUBST(JPEGLIB)
AC_CHECK_HEADERS(jpeglib.h,
AC_CHECK_LIB(jpeg,jpeg_start_decompress,
AC_DEFINE(HAVE_LIBJPEG,1,[Define if you have libjpeg including devel headers])
JPEGLIB="-ljpeg"
)
)
AC_SUBST(GIFLIB,"")
AC_CHECK_HEADERS(gif_lib.h,
AC_CHECK_LIB(ungif,DGifOpen,
[AC_DEFINE(HAVE_LIBGIF,1,[Define if you have libgif/libungif including devel headers])
GIFLIB="-lungif"],
[AC_CHECK_LIB(gif,DGifOpen,
[AC_DEFINE(HAVE_LIBGIF,1)
GIFLIB="-lgif"])]))
AC_SUBST(XLIB) AC_SUBST(XLIB)
AC_SUBST(XFILES) AC_SUBST(XFILES)
XFILES="" XFILES=""
@ -1031,6 +1013,8 @@ then
WINE_GET_SONAME(crypto,BIO_new_socket) WINE_GET_SONAME(crypto,BIO_new_socket)
WINE_GET_SONAME(ncurses,waddch) WINE_GET_SONAME(ncurses,waddch)
WINE_GET_SONAME(curses,waddch) WINE_GET_SONAME(curses,waddch)
WINE_GET_SONAME(jpeg,jpeg_start_decompress)
WINE_GET_SONAME(ungif,DGifOpen)
fi fi
@ -1108,9 +1092,11 @@ AC_CHECK_HEADERS(\
float.h \ float.h \
fontconfig/fontconfig.h \ fontconfig/fontconfig.h \
getopt.h \ getopt.h \
gif_lib.h \
ieeefp.h \ ieeefp.h \
io.h \ io.h \
jack/jack.h \ jack/jack.h \
jpeglib.h \
libio.h \ libio.h \
libutil.h \ libutil.h \
link.h \ link.h \

View File

@ -7,7 +7,7 @@ MODULE = oleaut32.dll
IMPORTS = ole32 rpcrt4 user32 gdi32 advapi32 kernel32 ntdll IMPORTS = ole32 rpcrt4 user32 gdi32 advapi32 kernel32 ntdll
DELAYIMPORTS = comctl32 DELAYIMPORTS = comctl32
ALTNAMES = ole2disp.dll typelib.dll ALTNAMES = ole2disp.dll typelib.dll
EXTRALIBS = $(LIBUNICODE) -luuid @GIFLIB@ @JPEGLIB@ EXTRALIBS = $(LIBUNICODE) -luuid
SPEC_SRCS16 = $(ALTNAMES:.dll=.spec) SPEC_SRCS16 = $(ALTNAMES:.dll=.spec)

View File

@ -36,6 +36,7 @@
*/ */
#include "config.h" #include "config.h"
#include "wine/port.h"
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
@ -49,6 +50,9 @@
*/ */
#ifdef HAVE_GIF_LIB_H #ifdef HAVE_GIF_LIB_H
# include <gif_lib.h> # include <gif_lib.h>
#ifndef SONAME_LIBUNGIF
#define SONAME_LIBUNGIF "libungif.so"
#endif
#endif #endif
#define NONAMELESSUNION #define NONAMELESSUNION
@ -67,16 +71,17 @@
#include "wine/wingdi16.h" #include "wine/wingdi16.h"
#include "cursoricon.h" #include "cursoricon.h"
#ifdef HAVE_LIBJPEG #ifdef HAVE_JPEGLIB_H
/* This is a hack, so jpeglib.h does not redefine INT32 and the like*/ /* This is a hack, so jpeglib.h does not redefine INT32 and the like*/
#define XMD_H #define XMD_H
#define UINT8 JPEG_UINT8 #define UINT8 JPEG_UINT8
#define UINT16 JPEG_UINT16 #define UINT16 JPEG_UINT16
#undef FAR #undef FAR
#ifdef HAVE_JPEGLIB_H
# include <jpeglib.h> # include <jpeglib.h>
#endif
#undef UINT16 #undef UINT16
#ifndef SONAME_LIBJPEG
#define SONAME_LIBJPEG "libjpeg.so"
#endif
#endif #endif
WINE_DEFAULT_DEBUG_CHANNEL(ole); WINE_DEFAULT_DEBUG_CHANNEL(ole);
@ -825,7 +830,41 @@ static HRESULT WINAPI OLEPictureImpl_IsDirty(
return E_NOTIMPL; return E_NOTIMPL;
} }
#ifdef HAVE_LIBJPEG #ifdef HAVE_JPEGLIB_H
static void *libjpeg_handle;
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
MAKE_FUNCPTR(jpeg_std_error);
MAKE_FUNCPTR(jpeg_CreateDecompress);
MAKE_FUNCPTR(jpeg_read_header);
MAKE_FUNCPTR(jpeg_start_decompress);
MAKE_FUNCPTR(jpeg_read_scanlines);
MAKE_FUNCPTR(jpeg_finish_decompress);
MAKE_FUNCPTR(jpeg_destroy_decompress);
#undef MAKE_FUNCPTR
static void *load_libjpeg(void)
{
if((libjpeg_handle = wine_dlopen(SONAME_LIBJPEG, RTLD_NOW, NULL, 0)) != NULL) {
#define LOAD_FUNCPTR(f) \
if((p##f = wine_dlsym(libjpeg_handle, #f, NULL, 0)) == NULL) { \
libjpeg_handle = NULL; \
return NULL; \
}
LOAD_FUNCPTR(jpeg_std_error);
LOAD_FUNCPTR(jpeg_CreateDecompress);
LOAD_FUNCPTR(jpeg_read_header);
LOAD_FUNCPTR(jpeg_start_decompress);
LOAD_FUNCPTR(jpeg_read_scanlines);
LOAD_FUNCPTR(jpeg_finish_decompress);
LOAD_FUNCPTR(jpeg_destroy_decompress);
#undef LOAD_FUNCPTR
}
return libjpeg_handle;
}
/* for the jpeg decompressor source manager. */ /* for the jpeg decompressor source manager. */
static void _jpeg_init_source(j_decompress_ptr cinfo) { } static void _jpeg_init_source(j_decompress_ptr cinfo) { }
@ -845,15 +884,41 @@ static boolean _jpeg_resync_to_restart(j_decompress_ptr cinfo, int desired) {
return FALSE; return FALSE;
} }
static void _jpeg_term_source(j_decompress_ptr cinfo) { } static void _jpeg_term_source(j_decompress_ptr cinfo) { }
#endif /* HAVE_LIBJPEG */ #endif /* HAVE_JPEGLIB_H */
#ifdef HAVE_GIF_LIB_H
static void *libungif_handle;
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
MAKE_FUNCPTR(DGifOpen);
MAKE_FUNCPTR(DGifSlurp);
MAKE_FUNCPTR(DGifCloseFile);
#undef MAKE_FUNCPTR
#ifdef HAVE_LIBGIF
struct gifdata { struct gifdata {
unsigned char *data; unsigned char *data;
unsigned int curoff; unsigned int curoff;
unsigned int len; unsigned int len;
}; };
static void *load_libungif(void)
{
if((libungif_handle = wine_dlopen(SONAME_LIBUNGIF, RTLD_NOW, NULL, 0)) != NULL) {
#define LOAD_FUNCPTR(f) \
if((p##f = wine_dlsym(libungif_handle, #f, NULL, 0)) == NULL) { \
libungif_handle = NULL; \
return NULL; \
}
LOAD_FUNCPTR(DGifOpen);
LOAD_FUNCPTR(DGifSlurp);
LOAD_FUNCPTR(DGifCloseFile);
#undef LOAD_FUNCPTR
}
return libungif_handle;
}
static int _gif_inputfunc(GifFileType *gif, GifByteType *data, int len) { static int _gif_inputfunc(GifFileType *gif, GifByteType *data, int len) {
struct gifdata *gd = (struct gifdata*)gif->UserData; struct gifdata *gd = (struct gifdata*)gif->UserData;
@ -865,7 +930,8 @@ static int _gif_inputfunc(GifFileType *gif, GifByteType *data, int len) {
gd->curoff += len; gd->curoff += len;
return len; return len;
} }
#endif
#endif /* HAVE_GIF_LIB_H */
/************************************************************************ /************************************************************************
* OLEPictureImpl_IPersistStream_Load (IUnknown) * OLEPictureImpl_IPersistStream_Load (IUnknown)
@ -875,7 +941,7 @@ static int _gif_inputfunc(GifFileType *gif, GifByteType *data, int len) {
* DWORD magic; * DWORD magic;
* DWORD len; * DWORD len;
* *
* Currently implemented: BITMAP, ICON, JPEG. * Currently implemented: BITMAP, ICON, JPEG, GIF
*/ */
static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) { static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
HRESULT hr = E_FAIL; HRESULT hr = E_FAIL;
@ -930,7 +996,7 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
magic = xbuf[0] + (xbuf[1]<<8); magic = xbuf[0] + (xbuf[1]<<8);
switch (magic) { switch (magic) {
case 0x4947: { /* GIF */ case 0x4947: { /* GIF */
#ifdef HAVE_LIBGIF #ifdef HAVE_GIF_LIB_H
struct gifdata gd; struct gifdata gd;
GifFileType *gif; GifFileType *gif;
BITMAPINFO *bmi; BITMAPINFO *bmi;
@ -944,11 +1010,18 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
ExtensionBlock *eb; ExtensionBlock *eb;
int padding; int padding;
if(!libungif_handle) {
if(!load_libungif()) {
FIXME("Failed reading GIF because unable to find %s\n", SONAME_LIBUNGIF);
return E_FAIL;
}
}
gd.data = xbuf; gd.data = xbuf;
gd.curoff = 0; gd.curoff = 0;
gd.len = xread; gd.len = xread;
gif = DGifOpen((void*)&gd, _gif_inputfunc); gif = pDGifOpen((void*)&gd, _gif_inputfunc);
ret = DGifSlurp(gif); ret = pDGifSlurp(gif);
if (ret == GIF_ERROR) { if (ret == GIF_ERROR) {
FIXME("Failed reading GIF using libgif.\n"); FIXME("Failed reading GIF using libgif.\n");
return E_FAIL; return E_FAIL;
@ -1052,7 +1125,7 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
DeleteDC(hdcref); DeleteDC(hdcref);
This->desc.picType = PICTYPE_BITMAP; This->desc.picType = PICTYPE_BITMAP;
OLEPictureImpl_SetBitmap(This); OLEPictureImpl_SetBitmap(This);
DGifCloseFile(gif); pDGifCloseFile(gif);
HeapFree(GetProcessHeap(),0,bytes); HeapFree(GetProcessHeap(),0,bytes);
return S_OK; return S_OK;
#else #else
@ -1062,7 +1135,7 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
break; break;
} }
case 0xd8ff: { /* JPEG */ case 0xd8ff: { /* JPEG */
#ifdef HAVE_LIBJPEG #ifdef HAVE_JPEGLIB_H
struct jpeg_decompress_struct jd; struct jpeg_decompress_struct jd;
struct jpeg_error_mgr jerr; struct jpeg_error_mgr jerr;
int ret; int ret;
@ -1075,6 +1148,13 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
LPBYTE oldbits; LPBYTE oldbits;
int i; int i;
if(!libjpeg_handle) {
if(!load_libjpeg()) {
FIXME("Failed reading JPEG because unable to find %s\n", SONAME_LIBJPEG);
return E_FAIL;
}
}
/* This is basically so we can use in-memory data for jpeg decompression. /* This is basically so we can use in-memory data for jpeg decompression.
* We need to have all the functions. * We need to have all the functions.
*/ */
@ -1086,12 +1166,14 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
xjsm.resync_to_restart = _jpeg_resync_to_restart; xjsm.resync_to_restart = _jpeg_resync_to_restart;
xjsm.term_source = _jpeg_term_source; xjsm.term_source = _jpeg_term_source;
jd.err = jpeg_std_error(&jerr); jd.err = pjpeg_std_error(&jerr);
jpeg_create_decompress(&jd); /* jpeg_create_decompress is a macro that expands to jpeg_CreateDecompress - see jpeglib.h
* jpeg_create_decompress(&jd); */
pjpeg_CreateDecompress(&jd, JPEG_LIB_VERSION, (size_t) sizeof(struct jpeg_decompress_struct));
jd.src = &xjsm; jd.src = &xjsm;
ret=jpeg_read_header(&jd,TRUE); ret=pjpeg_read_header(&jd,TRUE);
jd.out_color_space = JCS_RGB; jd.out_color_space = JCS_RGB;
jpeg_start_decompress(&jd); pjpeg_start_decompress(&jd);
if (ret != JPEG_HEADER_OK) { if (ret != JPEG_HEADER_OK) {
ERR("Jpeg image in stream has bad format, read header returned %d.\n",ret); ERR("Jpeg image in stream has bad format, read header returned %d.\n",ret);
HeapFree(GetProcessHeap(),0,xbuf); HeapFree(GetProcessHeap(),0,xbuf);
@ -1105,7 +1187,7 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
oldbits = bits; oldbits = bits;
oldsamprow = samprow; oldsamprow = samprow;
while ( jd.output_scanline<jd.output_height ) { while ( jd.output_scanline<jd.output_height ) {
x = jpeg_read_scanlines(&jd,&samprow,1); x = pjpeg_read_scanlines(&jd,&samprow,1);
if (x != 1) { if (x != 1) {
FIXME("failed to read current scanline?\n"); FIXME("failed to read current scanline?\n");
break; break;
@ -1134,8 +1216,8 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
bmi.biClrImportant = 0; bmi.biClrImportant = 0;
HeapFree(GetProcessHeap(),0,samprow); HeapFree(GetProcessHeap(),0,samprow);
jpeg_finish_decompress(&jd); pjpeg_finish_decompress(&jd);
jpeg_destroy_decompress(&jd); pjpeg_destroy_decompress(&jd);
hdcref = GetDC(0); hdcref = GetDC(0);
This->desc.u.bmp.hbitmap=CreateDIBitmap( This->desc.u.bmp.hbitmap=CreateDIBitmap(
hdcref, hdcref,

View File

@ -248,18 +248,12 @@
/* Define if you have the curses library (-lcurses) */ /* Define if you have the curses library (-lcurses) */
#undef HAVE_LIBCURSES #undef HAVE_LIBCURSES
/* Define if you have libgif/libungif including devel headers */
#undef HAVE_LIBGIF
/* Define to 1 if you have the `i386' library (-li386). */ /* Define to 1 if you have the `i386' library (-li386). */
#undef HAVE_LIBI386 #undef HAVE_LIBI386
/* Define to 1 if you have the <libio.h> header file. */ /* Define to 1 if you have the <libio.h> header file. */
#undef HAVE_LIBIO_H #undef HAVE_LIBIO_H
/* Define if you have libjpeg including devel headers */
#undef HAVE_LIBJPEG
/* Define if you have the ncurses library (-lncurses) */ /* Define if you have the ncurses library (-lncurses) */
#undef HAVE_LIBNCURSES #undef HAVE_LIBNCURSES
@ -887,6 +881,9 @@
/* Define to the soname of the libjack library. */ /* Define to the soname of the libjack library. */
#undef SONAME_LIBJACK #undef SONAME_LIBJACK
/* Define to the soname of the libjpeg library. */
#undef SONAME_LIBJPEG
/* Define to the soname of the libncurses library. */ /* Define to the soname of the libncurses library. */
#undef SONAME_LIBNCURSES #undef SONAME_LIBNCURSES
@ -896,6 +893,9 @@
/* Define to the soname of the libtxc_dxtn library. */ /* Define to the soname of the libtxc_dxtn library. */
#undef SONAME_LIBTXC_DXTN #undef SONAME_LIBTXC_DXTN
/* Define to the soname of the libungif library. */
#undef SONAME_LIBUNGIF
/* Define to the soname of the libX11 library. */ /* Define to the soname of the libX11 library. */
#undef SONAME_LIBX11 #undef SONAME_LIBX11