mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-29 01:24:51 +02:00
Implemented native gzip compression/decompression using zlib routines.
Compression levels of the output can be controlled with the "gds compress [<value>]" command, where <value> 0 (default) is uncompressed output, 6 is "normal" gzip compression, and 9 is maximum compression.
This commit is contained in:
Vendored
+43
@@ -5035,6 +5035,49 @@ $as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzopen in -lz" >&5
|
||||
$as_echo_n "checking for gzopen in -lz... " >&6; }
|
||||
if ${ac_cv_lib_z_gzopen+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lz $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char gzopen ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return gzopen ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_z_gzopen=yes
|
||||
else
|
||||
ac_cv_lib_z_gzopen=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzopen" >&5
|
||||
$as_echo "$ac_cv_lib_z_gzopen" >&6; }
|
||||
if test "x$ac_cv_lib_z_gzopen" = xyes; then :
|
||||
|
||||
$as_echo "#define HAVE_ZLIB 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -178,6 +178,9 @@ then
|
||||
AC_DEFINE(HAVE___VA_COPY, 1, [Define if we have __va_copy])
|
||||
fi
|
||||
|
||||
dnl Check for zlib
|
||||
AC_CHECK_LIB([z],[gzopen],[AC_DEFINE([HAVE_ZLIB],[1],["zlib compression"])])
|
||||
|
||||
dnl Check for some C99 functions
|
||||
|
||||
dnl Built-in round/roundf require CFLAGS -std=c99, but this also
|
||||
|
||||
Reference in New Issue
Block a user