Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
615e0e64
Commit
615e0e64
authored
Feb 27, 2010
by
Marcus Meissner
Committed by
Alexandre Julliard
Mar 02, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Handle old libpng.so using distros (as SLE 10).
parent
6c84c3f9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
104 additions
and
0 deletions
+104
-0
configure
configure
+84
-0
configure.ac
configure.ac
+5
-0
pngformat.c
dlls/windowscodecs/pngformat.c
+12
-0
config.h.in
include/config.h.in
+3
-0
No files found.
configure
View file @
615e0e64
...
...
@@ -11060,6 +11060,49 @@ _ACEOF
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for png_set_expand_gray_1_2_4_to_8 in -lpng"
>
&5
$as_echo_n
"checking for png_set_expand_gray_1_2_4_to_8 in -lpng... "
>
&6
;
}
if
test
"
${
ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8
+set
}
"
=
set
;
then
:
$as_echo_n
"(cached) "
>
&6
else
ac_check_lib_save_LIBS
=
$LIBS
LIBS
=
"-lpng -lm -lz
$LIBS
"
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char png_set_expand_gray_1_2_4_to_8 ();
int
main ()
{
return png_set_expand_gray_1_2_4_to_8 ();
;
return 0;
}
_ACEOF
if
ac_fn_c_try_link
"
$LINENO
"
;
then
:
ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8
=
yes
else
ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8
=
no
fi
rm
-f
core conftest.err conftest.
$ac_objext
\
conftest
$ac_exeext
conftest.
$ac_ext
LIBS
=
$ac_check_lib_save_LIBS
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8
"
>
&5
$as_echo
"
$ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8
"
>
&6
;
}
if
test
"x
$ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8
"
=
x
""
yes
;
then
:
$as_echo
"#define HAVE_PNG_SET_EXPAND_GRAY_1_2_4_TO_8 1"
>>
confdefs.h
fi
elif
test
-n
"
$X_CFLAGS
"
-a
"x
$with_png
"
!=
"xno"
then
ac_save_CPPFLAGS
=
"
$CPPFLAGS
"
...
...
@@ -11132,6 +11175,47 @@ _ACEOF
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for png_set_expand_gray_1_2_4_to_8 in -lpng"
>
&5
$as_echo_n
"checking for png_set_expand_gray_1_2_4_to_8 in -lpng... "
>
&6
;
}
if
test
"
${
ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8
+set
}
"
=
set
;
then
:
$as_echo_n
"(cached) "
>
&6
else
ac_check_lib_save_LIBS
=
$LIBS
LIBS
=
"-lpng
$X_LIBS
-lm -lz
$LIBS
"
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char png_set_expand_gray_1_2_4_to_8 ();
int
main ()
{
return png_set_expand_gray_1_2_4_to_8 ();
;
return 0;
}
_ACEOF
if
ac_fn_c_try_link
"
$LINENO
"
;
then
:
ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8
=
yes
else
ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8
=
no
fi
rm
-f
core conftest.err conftest.
$ac_objext
\
conftest
$ac_exeext
conftest.
$ac_ext
LIBS
=
$ac_check_lib_save_LIBS
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8
"
>
&5
$as_echo
"
$ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8
"
>
&6
;
}
if
test
"x
$ac_cv_lib_png_png_set_expand_gray_1_2_4_to_8
"
=
x
""
yes
;
then
:
$as_echo
"#define HAVE_PNG_SET_EXPAND_GRAY_1_2_4_TO_8 1"
>>
confdefs.h
fi
fi
fi
if
test
"x
$ac_cv_lib_soname_png
"
=
"x"
;
then
:
...
...
configure.ac
View file @
615e0e64
...
...
@@ -1420,6 +1420,9 @@ dnl **** Check for libpng ****
if test "$ac_cv_header_png_h" = "yes"
then
WINE_CHECK_SONAME(png,png_create_read_struct,,,-lm -lz,[[libpng[[0-9]]*]])
AC_CHECK_LIB(png,png_set_expand_gray_1_2_4_to_8,
[AC_DEFINE(HAVE_PNG_SET_EXPAND_GRAY_1_2_4_TO_8,1,[Define to 1 if libpng has the png_set_expand_gray_1_2_4_to_8 function.])]
,,-lm -lz)
elif test -n "$X_CFLAGS" -a "x$with_png" != "xno"
then
dnl libpng is in the X directory on Mac OS X
...
...
@@ -1432,6 +1435,8 @@ then
then
AC_SUBST(PNGINCL,"$X_CFLAGS")
WINE_CHECK_SONAME(png,png_create_read_struct,,,[$X_LIBS -lm -lz],[[libpng[[0-9]]*]])
AC_CHECK_LIB(png,png_set_expand_gray_1_2_4_to_8,
[AC_DEFINE(HAVE_PNG_SET_EXPAND_GRAY_1_2_4_TO_8,1)],,[$X_LIBS -lm -lz])
fi
fi
WINE_WARNING_WITH(png,[test "x$ac_cv_lib_soname_png" = "x"],
...
...
dlls/windowscodecs/pngformat.c
View file @
615e0e64
...
...
@@ -60,7 +60,11 @@ MAKE_FUNCPTR(png_get_PLTE);
MAKE_FUNCPTR
(
png_get_tRNS
);
MAKE_FUNCPTR
(
png_set_bgr
);
MAKE_FUNCPTR
(
png_set_error_fn
);
#if HAVE_PNG_SET_EXPAND_GRAY_1_2_4_TO_8
MAKE_FUNCPTR
(
png_set_expand_gray_1_2_4_to_8
);
#else
MAKE_FUNCPTR
(
png_set_gray_1_2_4_to_8
);
#endif
MAKE_FUNCPTR
(
png_set_filler
);
MAKE_FUNCPTR
(
png_set_gray_to_rgb
);
MAKE_FUNCPTR
(
png_set_IHDR
);
...
...
@@ -103,7 +107,11 @@ static void *load_libpng(void)
LOAD_FUNCPTR
(
png_get_tRNS
);
LOAD_FUNCPTR
(
png_set_bgr
);
LOAD_FUNCPTR
(
png_set_error_fn
);
#if HAVE_PNG_SET_EXPAND_GRAY_1_2_4_TO_8
LOAD_FUNCPTR
(
png_set_expand_gray_1_2_4_to_8
);
#else
LOAD_FUNCPTR
(
png_set_gray_1_2_4_to_8
);
#endif
LOAD_FUNCPTR
(
png_set_filler
);
LOAD_FUNCPTR
(
png_set_gray_to_rgb
);
LOAD_FUNCPTR
(
png_set_IHDR
);
...
...
@@ -306,7 +314,11 @@ static HRESULT WINAPI PngDecoder_Initialize(IWICBitmapDecoder *iface, IStream *p
{
if
(
bit_depth
<
8
)
{
#if HAVE_PNG_SET_EXPAND_GRAY_1_2_4_TO_8
ppng_set_expand_gray_1_2_4_to_8
(
This
->
png_ptr
);
#else
ppng_set_gray_1_2_4_to_8
(
This
->
png_ptr
);
#endif
bit_depth
=
8
;
}
ppng_set_gray_to_rgb
(
This
->
png_ptr
);
...
...
include/config.h.in
View file @
615e0e64
...
...
@@ -582,6 +582,9 @@
/* Define to 1 if you have the <png.h> header file. */
#undef HAVE_PNG_H
/* Define to 1 if libpng has the png_set_expand_gray_1_2_4_to_8 function. */
#undef HAVE_PNG_SET_EXPAND_GRAY_1_2_4_TO_8
/* Define to 1 if you have the `poll' function. */
#undef HAVE_POLL
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment