Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
build/pkgs/libpng/spkg-configure.m4: Do not find libpng and then keep…
Browse files Browse the repository at this point in the history
… it a secret
  • Loading branch information
Matthias Koeppe committed May 1, 2020
1 parent 50c5ac8 commit 0ac76c3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions build/pkgs/libpng/spkg-configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ SAGE_SPKG_CONFIGURE([libpng], [
AC_MSG_RESULT([no])
dnl First try checking for libpng with pkg-config
PKG_CHECK_MODULES([LIBPNG], [libpng >= 1.2], [], [
dnl Fallback to manually grubbing around for headers and libs
AC_CHECK_HEADERS([png.h], [break], [sage_spkg_install_libpng=yes])
AC_SEARCH_LIBS([png_get_io_ptr], [png], [], [sage_spkg_install_libpng=yes])
sage_spkg_install_libpng=yes
dnl Yes, we *could* fallback to manually grubbing around for headers and libs as follows:
dnl AC_CHECK_HEADERS([png.h], [break], [sage_spkg_install_libpng=yes])
dnl AC_SEARCH_LIBS([png_get_io_ptr], [png], [], [sage_spkg_install_libpng=yes])
dnl But 'matplotlib' and 'sagelib' rely on pkg-config to locate libpng.
dnl So we would have to tell them about the libpng that we found,
dnl for example by creating a facade .pc file like we do for BLAS.
])
fi
])

0 comments on commit 0ac76c3

Please sign in to comment.