Skip to content

Commit

Permalink
Trac #29448: configure finds libpng but matplotlib does not
Browse files Browse the repository at this point in the history
This happens at least in the following situation: Sage 9.1.beta9 on OS
X, using the system's rather than Sage's Python, no pkg-config
installed.

URL: https://trac.sagemath.org/29448
Reported by: mkoeppe
Ticket author(s): Matthias Koeppe
Reviewer(s): Dima Pasechnik
  • Loading branch information
Release Manager committed May 2, 2020
2 parents 1302e46 + 0ac76c3 commit cc17d2e
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 cc17d2e

Please sign in to comment.