From 22d174231190d935e7c31b8e6ac84d49c81a861f Mon Sep 17 00:00:00 2001 From: wraitii Date: Thu, 26 Nov 2020 09:15:36 +0000 Subject: [PATCH] Fix MacOS libpng compilation against the 10.12 SDK This was SVN commit r24260. --- libraries/osx/build-osx-libs.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/osx/build-osx-libs.sh b/libraries/osx/build-osx-libs.sh index b1fbf8f3a2..9532ab20b7 100755 --- a/libraries/osx/build-osx-libs.sh +++ b/libraries/osx/build-osx-libs.sh @@ -471,8 +471,9 @@ then tar -xf $LIB_ARCHIVE pushd $LIB_DIRECTORY - (./configure CFLAGS="$CFLAGS" \ - LDFLAGS="$LDFLAGS" \ + # libpng has no flags for zlib but the 10.12 version is too old, so link our own. + (./configure CFLAGS="$CFLAGS" CPPFLAGS=" -I $ZLIB_DIR/include "\ + LDFLAGS="$LDFLAGS -L$ZLIB_DIR/lib" \ --prefix=$INSTALL_DIR \ --enable-shared=no \ && make ${JOBS} && make install) || die "libpng build failed"