mirror of
https://github.com/stella-emu/stella.git
synced 2026-10-11 22:29:55 +00:00
Fix POSIX zlib/png building when system libs not available.
This also allows to remove code from zconf upstream that I always had to place there.
This commit is contained in:
@@ -610,43 +610,48 @@ else
|
||||
fi
|
||||
|
||||
#
|
||||
# Check for ZLib
|
||||
# Check for zlib and libpng
|
||||
#
|
||||
echocheck "zlib"
|
||||
if test "$_build_zip" = yes ; then
|
||||
_zlib=no
|
||||
$_pkg_config --exists zlib && _zlib=yes
|
||||
|
||||
if test "$_zlib" = yes ; then
|
||||
echo "`$_pkg_config --modversion zlib`"
|
||||
else
|
||||
echo "disabled"
|
||||
_build_png=no
|
||||
_build_zip=no
|
||||
fi
|
||||
else
|
||||
echo "disabled"
|
||||
_build_png=no
|
||||
_build_zip=no
|
||||
fi
|
||||
|
||||
#
|
||||
# Check for libpng
|
||||
#
|
||||
echocheck "libpng"
|
||||
if test "$_build_png" = yes ; then
|
||||
_libpng=no
|
||||
$_pkg_config --exists libpng && _libpng=yes
|
||||
|
||||
if test "$_libpng" = yes ; then
|
||||
echo "`$_pkg_config --modversion libpng`"
|
||||
# The built-in libpng is tied to the built-in zlib's version, so if
|
||||
# either library is missing, both built-in versions are used
|
||||
if test "$_zlib" != yes || test "$_libpng" != yes ; then
|
||||
_zlib=no
|
||||
_libpng=no
|
||||
fi
|
||||
fi
|
||||
|
||||
echocheck "zlib"
|
||||
if test "$_build_zip" = yes ; then
|
||||
if test "$_zlib" = yes ; then
|
||||
echo "`$_pkg_config --modversion zlib`"
|
||||
else
|
||||
echo "disabled"
|
||||
_build_png=no
|
||||
echo "built-in"
|
||||
fi
|
||||
else
|
||||
echo "disabled"
|
||||
fi
|
||||
|
||||
echocheck "libpng"
|
||||
if test "$_build_png" = yes ; then
|
||||
if test "$_libpng" = yes ; then
|
||||
echo "`$_pkg_config --modversion libpng`"
|
||||
else
|
||||
echo "built-in"
|
||||
fi
|
||||
else
|
||||
echo "disabled"
|
||||
_build_png=no
|
||||
fi
|
||||
|
||||
#
|
||||
@@ -804,12 +809,12 @@ LD=$CXX
|
||||
|
||||
case $_host_os in
|
||||
unix)
|
||||
DEFINES="$DEFINES -DBSPF_UNIX"
|
||||
DEFINES="$DEFINES -DBSPF_UNIX -DHAVE_UNISTD_H"
|
||||
MODULES="$MODULES $SRC_OS/unix"
|
||||
INCLUDES="$INCLUDES -I$SRC_OS/unix"
|
||||
;;
|
||||
darwin)
|
||||
DEFINES="$DEFINES -DBSPF_UNIX -DMACOS_KEYS"
|
||||
DEFINES="$DEFINES -DBSPF_UNIX -DMACOS_KEYS -DHAVE_UNISTD_H"
|
||||
MODULES="$MODULES $SRC_OS/unix"
|
||||
INCLUDES="$INCLUDES -I$SRC_OS/unix"
|
||||
if test "$have_clang" == yes; then
|
||||
|
||||
@@ -8,13 +8,6 @@
|
||||
#ifndef ZCONF_H
|
||||
#define ZCONF_H
|
||||
|
||||
/* Added by SA: 2018-12-18 */
|
||||
#if defined(BSPF_UNIX) || defined(BSPF_MACOS)
|
||||
# define HAVE_UNISTD_H
|
||||
#endif
|
||||
#define HAVE_STDARG_H
|
||||
/***************************/
|
||||
|
||||
/*
|
||||
* If you *really* need a unique prefix for all types and library functions,
|
||||
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
|
||||
|
||||
@@ -3980,6 +3980,7 @@
|
||||
SOUND_SUPPORT,
|
||||
WINDOWED_SUPPORT,
|
||||
BSPF_MACOS,
|
||||
HAVE_UNISTD_H,
|
||||
MAC_OSX,
|
||||
"PNG_ARM_NEON_OPT=0",
|
||||
);
|
||||
@@ -4048,6 +4049,7 @@
|
||||
SOUND_SUPPORT,
|
||||
WINDOWED_SUPPORT,
|
||||
BSPF_MACOS,
|
||||
HAVE_UNISTD_H,
|
||||
MAC_OSX,
|
||||
"PNG_ARM_NEON_OPT=0",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user