diff options
author | Cameron Cawley | 2019-09-20 21:44:40 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-21 03:08:56 +0200 |
commit | 5ae854cc2474b744020d41368f08416b24a5b06a (patch) | |
tree | dbce2168566f6ec11d7734ae92068c500e53fd53 /configure | |
parent | a637f2d06bde5add0c69e780caca910e51a64c01 (diff) | |
download | scummvm-rg350-5ae854cc2474b744020d41368f08416b24a5b06a.tar.gz scummvm-rg350-5ae854cc2474b744020d41368f08416b24a5b06a.tar.bz2 scummvm-rg350-5ae854cc2474b744020d41368f08416b24a5b06a.zip |
CONFIGURE: Allow using pkg-config to detect libpng
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -4429,6 +4429,12 @@ echo "$_jpeg" # Check for PNG # echocheck "PNG >= 1.2.8" +if test "$_pkg_config" = "yes" && $_pkgconfig --exists libpng; then + append_var PNG_LIBS "`$_pkgconfig --libs libpng`" + append_var PNG_CFLAGS "`$_pkgconfig --cflags libpng`" +else + append_var PNG_LIBS "-lpng -lz" +fi if test "$_png" = auto ; then _png=no cat > $TMPC << EOF @@ -4441,10 +4447,10 @@ int main(void) { return 0; } EOF - cc_check $PNG_CFLAGS $PNG_LIBS -lpng -lz && _png=yes + cc_check $PNG_CFLAGS $PNG_LIBS && _png=yes fi if test "$_png" = yes ; then - append_var LIBS "$PNG_LIBS -lpng -lz" + append_var LIBS "$PNG_LIBS" append_var INCLUDES "$PNG_CFLAGS" fi define_in_config_if_yes "$_png" 'USE_PNG' |