Revision: 45440
http://sourceforge.net/p/vice-emu/code/45440
Author: compyx
Date: 2024-12-31 10:06:02 +0000 (Tue, 31 Dec 2024)
Log Message:
-----------
Build system: remove --without-zlib and make zlib mandatory
Zlib is ubiquitous enough to just require as a hard dependency.
Modified Paths:
--------------
trunk/vice/configure.ac
trunk/vice/src/lib/libzmbv/Makefile.am
trunk/vice/src/vicefeatures.c
trunk/vice/src/zfile.c
Modified: trunk/vice/configure.ac
===================================================================
--- trunk/vice/configure.ac 2024-12-31 06:32:45 UTC (rev 45439)
+++ trunk/vice/configure.ac 2024-12-31 10:06:02 UTC (rev 45440)
@@ -112,7 +112,6 @@
dnl
dnl Misc build options
dnl
-VICE_ARG_WITH_LIST(zlib, [ --without-zlib do not use the zlib support])
VICE_ARG_WITH_LIST(unzip-bin, [ --with-unzip-bin enables distribution of unzip.exe in the windows bindist])
VICE_ARG_WITH_LIST(libieee1284, [ --with-libieee1284 use the libieee1284 parallel port library])
VICE_ARG_ENABLE_LIST(arch, [ --enable-arch[[=arch]] enable architecture specific compilation [[default=yes]]], [], [enable_arch=yes])
@@ -1195,10 +1194,6 @@
AC_MSG_ERROR([GTK3 UI requested, but GTK3 support packages are missing])
fi
fi
- dnl error out if gtk3 support is requested but zlib is disabled
- if test x"$enable_gtk3ui" = "xyes" -a x"$with_zlib" = "xno"; then
- AC_MSG_ERROR([GTK3 UI requested, but zlib is explicitly disabled])
- fi
dnl Used to compile the vice.gresource.xml file
AC_CHECK_PROG(GLIB_COMPILE_RESOURCES, [glib-compile-resources], [glib-compile-resources], [no])
@@ -2159,27 +2154,19 @@
dnl ----- ZLib -----
ZLIB_LIBS=
-if test x"$with_zlib" != "xno" ; then
- AC_CHECK_HEADER(zlib.h,,)
- if test x"$ac_cv_header_zlib_h" = "xyes" ; then
- ac_cv_lib_z_zlibVersion=yes
- AC_CHECK_LIB(z, zlibVersion,
+AC_CHECK_HEADER(zlib.h,,)
+if test x"$ac_cv_header_zlib_h" = "xyes" ; then
+ ac_cv_lib_z_zlibVersion=yes
+ AC_CHECK_LIB(z, zlibVersion,
[ ZLIB_LIBS="-lz";
HAVE_ZLIB_SUPPORT="yes";
AC_DEFINE(HAVE_ZLIB,,
[Can we use the ZLIB compression library?]) ],,)
- fi
-fi
-
-if test x"$HAVE_ZLIB_SUPPORT" = "xyes" ; then
- AM_CONDITIONAL(HAVE_ZLIB, true)
else
- AM_CONDITIONAL(HAVE_ZLIB, false)
+ AC_MSG_ERROR([Zlib header not found, please install zlib.])
fi
-
AC_SUBST(ZLIB_LIBS)
-
dnl --- Curl / WIC64 ---
dnl We need at least version 7.77.1 for `CURLSSLOPT_NATIVE_CA`
dnl
@@ -3731,8 +3718,6 @@
echo "POSIX 1003.1e capabilities support: $HAVE_CAPABILITIES_SUPPORT"
fi
-echo "zlib support : $HAVE_ZLIB_SUPPORT (--with/without-zlib)"
-
if test x"$real_arch" = "xUnix"; then
echo "libieee1284 support : $HAVE_LIBIEEE1284_SUPPORT (--with/--wihout-libieee1284)"
fi
Modified: trunk/vice/src/lib/libzmbv/Makefile.am
===================================================================
--- trunk/vice/src/lib/libzmbv/Makefile.am 2024-12-31 06:32:45 UTC (rev 45439)
+++ trunk/vice/src/lib/libzmbv/Makefile.am 2024-12-31 10:06:02 UTC (rev 45440)
@@ -5,11 +5,6 @@
AM_CXXFLAGS = @VICE_CXXFLAGS@
AM_LDFLAGS = @VICE_LDFLAGS@
-if !HAVE_ZLIB
-AM_CPPFLAGS += -DZMBV_USE_MINIZ
-AM_CFLAGS += -DZMBV_USE_MINIZ
-endif
-
noinst_LIBRARIES = libzmbv.a
libzmbv_a_SOURCES = \
Modified: trunk/vice/src/vicefeatures.c
===================================================================
--- trunk/vice/src/vicefeatures.c 2024-12-31 06:32:45 UTC (rev 45439)
+++ trunk/vice/src/vicefeatures.c 2024-12-31 10:06:02 UTC (rev 45440)
@@ -350,12 +350,6 @@
#endif
/* (all) */
- { "HAVE_ZLIB", "Use the ZLIB compression library.",
-#ifndef HAVE_ZLIB
- 0 },
-#else
- 1 },
-#endif
#ifdef UNIX_COMPILE /* (unix) */
{ "LINUX_JOYSTICK", "Enable support for Linux style joysticks.",
#ifndef LINUX_JOYSTICK
Modified: trunk/vice/src/zfile.c
===================================================================
--- trunk/vice/src/zfile.c 2024-12-31 06:32:45 UTC (rev 45439)
+++ trunk/vice/src/zfile.c 2024-12-31 10:06:02 UTC (rev 45440)
@@ -43,9 +43,7 @@
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
-#ifdef HAVE_ZLIB
#include <zlib.h>
-#endif
#ifdef HAVE_STRINGS_H
#include <strings.h>
@@ -199,7 +197,6 @@
of the temporary file; return NULL otherwise. */
static char *try_uncompress_with_gzip(const char *name)
{
-#ifdef HAVE_ZLIB
FILE *fddest;
gzFile fdsrc;
char *tmp_name = NULL;
@@ -242,38 +239,6 @@
fclose(fddest);
return tmp_name;
-#else
- char *tmp_name = NULL;
- int exit_status;
- char *argv[4];
-
- if (!file_is_gzip(name)) {
- return NULL;
- }
-
- /* `exec*()' does not want these to be constant... */
- argv[0] = lib_strdup("gzip");
- argv[1] = lib_strdup("-cd");
- argv[2] = archdep_filename_parameter(name);
- argv[3] = NULL;
-
- ZDEBUG(("try_uncompress_with_gzip: spawning gzip -cd %s", name));
- exit_status = archdep_spawn("gzip", argv, &tmp_name, NULL);
-
- lib_free(argv[0]);
- lib_free(argv[1]);
- lib_free(argv[2]);
-
- if (exit_status == 0) {
- ZDEBUG(("try_uncompress_with_gzip: OK"));
- return tmp_name;
- } else {
- ZDEBUG(("try_uncompress_with_gzip: failed"));
- archdep_remove(tmp_name);
- lib_free(tmp_name);
- return NULL;
- }
-#endif
}
/* If `name' has a bzip-like extension, try to uncompress it into a temporary
@@ -829,7 +794,6 @@
/* Compress `src' into `dest' using gzip. */
static int compress_with_gzip(const char *src, const char *dest)
{
-#ifdef HAVE_ZLIB
FILE *fdsrc;
gzFile fddest;
size_t len;
@@ -859,36 +823,6 @@
ZDEBUG(("compress with zlib: OK."));
return 0;
-#else
- static char *argv[4];
- int exit_status;
- char *mdest;
-
- /* `exec*()' does not want these to be constant... */
- argv[0] = lib_strdup("gzip");
- argv[1] = lib_strdup("-c");
- argv[2] = lib_strdup(src);
- argv[3] = NULL;
-
- mdest = lib_strdup(dest);
-
- ZDEBUG(("compress_with_gzip: spawning gzip -c %s", src));
- exit_status = archdep_spawn("gzip", argv, &mdest, NULL);
-
- lib_free(mdest);
-
- lib_free(argv[0]);
- lib_free(argv[1]);
- lib_free(argv[2]);
-
- if (exit_status == 0) {
- ZDEBUG(("compress_with_gzip: OK."));
- return 0;
- } else {
- ZDEBUG(("compress_with_gzip: failed."));
- return -1;
- }
-#endif
}
/* Compress `src' into `dest' using bzip. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|