Commit Graph

88 Commits

Author SHA1 Message Date
Mark Adler
5dc7681ff1 Fix version numbering for Darwin shared library. 2023-08-18 16:01:06 -07:00
Mark Adler
09155eaa2f zlib 1.3 2023-08-18 01:45:36 -07:00
OldWorldOrdr
daf27aed08 Look for a cross-compile libtool first in configure.
Permit cross-compilation for Darwin.
2023-08-17 17:12:52 -07:00
Mark Adler
1411ccafc0 Add memory sanitizer to configure (--memory).
This also adds --address for the address sanitizer, in addition to
the existing --sanitizer. -fno-omit-frame-pointer has been added
for both sanitizers to improve the error reporting.
2023-08-12 11:03:46 -07:00
Dimitri Papadopoulos
c7ddcc2e0e Fix some spelling errors. 2023-08-03 13:53:24 -07:00
Mark Adler
e9d5486e66 Remove K&R function definitions from zlib.
C2X has removed K&R definitions from the C function syntax.
Though the standard has not yet been approved, some high-profile
compilers are now issuing warnings when such definitions are
encountered.
2023-04-15 21:17:31 -07:00
Mark Adler
5799c14c85 Turn off C2X warning about deprecated K&R function syntax.
This is a temporary workaround before excising the K&R prototypes.
2023-04-13 20:09:52 -07:00
Mark Adler
723abd54d8 Minor formatting changes in configure.
No code changes.
2022-10-10 11:11:12 -07:00
Mark Adler
0091cb0281 Fix linking on AIX with gcc. 2022-10-10 11:00:49 -07:00
Mark Adler
29fd715fd0 Turn off RWX segment warnings on sparc systems. 2022-10-10 10:30:22 -07:00
Mark Adler
d30b763dac Remove vestigial line from configure. 2022-10-09 19:44:32 -07:00
Mark Adler
013c0ca0f4 Search for system name in CHOST instead of trying to extract it. 2022-10-09 16:55:49 -07:00
Mark Adler
8cca42c33f Remove bypass of MinGW gcc case in configure. 2022-10-09 15:40:35 -07:00
Mark Adler
d0704a8201 Remove deleted assembler code references.
The code was removed, but the builds that used the code were not
updated. This fixes that. Thanks to Adenilson and toxieainc for
the patches.
2022-10-06 20:43:09 -07:00
Mark Adler
095da07753 Remove -pedantic from configure -w compile options. 2022-10-06 01:03:18 -07:00
Mark Adler
22aec0cb0b Add -g when debugging with -fsanitize=address to include symbols. 2022-07-31 09:32:43 -07:00
Mark Adler
05796d3d8d Fix configure issue that discarded provided CC definition. 2022-03-28 18:34:10 -07:00
Mark Adler
e9a52aa129 Check for cc masquerading as gcc or clang in configure. 2022-03-27 13:47:33 -07:00
Mark Adler
6847291ea0 Separate out address sanitizing from warnings in configure. 2022-03-27 01:54:17 -07:00
Mark Adler
f8719f5ae5 Speed up software CRC-32 computation by a factor of 1.5 to 3.
Use the interleaved method of Kadatch and Jenkins in order to make
use of pipelined instructions through multiple ALUs in a single
core. This also speeds up and simplifies the combination of CRCs,
and updates the functions to pre-calculate and use an operator for
CRC combination.
2018-12-26 12:26:52 -08:00
Mark Adler
be5e3647c4 Add address checking in clang to -w option of configure. 2017-02-18 23:07:01 -08:00
Mark Adler
cca27e95cf Avoid the need for ssize_t.
Limit read() and write() requests to sizes that fit in an int.
This allows storing the return value in an int, and avoiding the
need to use or construct an ssize_t type. This is required for
Microsoft C, whose _read and _write functions take an unsigned
request and return an int.
2016-12-31 10:06:40 -08:00
Mark Adler
f12d3dc367 Detect clang in cc version. 2016-12-30 20:00:57 -08:00
Mark Adler
3f8c768745 Fix compile option for when z_size_t needs to be a long long. 2016-12-04 17:19:36 -08:00
Mark Adler
ca50ebd4df Create z_size_t and z_ssize_t types.
Normally these are set to size_t and ssize_t. But if they do not
exist, then they are set to the smallest integer type that can
contain a pointer. size_t is unsigned and ssize_t is signed.
2016-12-04 07:48:48 -08:00
Mark Adler
fc130cdd9f Add --debug (-d) option to ./configure to define ZLIB_DEBUG. 2016-12-04 07:39:37 -08:00
Mark Adler
8b95fa19cd Add --warn option to ./configure, instead of environment variable. 2016-10-11 22:21:04 -07:00
Mark Adler
55d98b4c30 Allow building zlib outside of the source directory.
To build, simply run configure from the source directory by
specifying its path.  That path will be used to find the source
files.  The source directory will not be touched.  All new and
modified files will be made in the current directory.  Discovered
in the process that not all makes understand % or $<, and not all
compilers understand -include or -I-.  This required a larger
Makefile.in with explicit dependencies.
2015-08-02 21:35:50 -07:00
Mark Adler
03ff48cc67 Remove runtime check in configure for four-byte integer type.
That didn't work when cross-compiling.  Simply rely on limits.h.
If a compiler does not have limits.h, then zconf.h.in should be
modified to define Z_U4 as an unsiged four-byte integer type in
order for crc32() to be fast.

This also simplifies and makes more portable to check for a four-
byte type using limits.h.
2013-03-23 22:30:09 -07:00
Mark Adler
66fcefbb2f Fix configure for Sun shell. 2013-03-23 13:50:10 -07:00
Mark Adler
62d6112a79 Clean up the usage of z_const and respect const usage within zlib.
This patch allows zlib to compile cleanly with the -Wcast-qual gcc
warning enabled, but only if ZLIB_CONST is defined, which adds
const to next_in and msg in z_stream and in the in_func prototype.
A --const option is added to ./configure which adds -DZLIB_CONST
to the compile flags, and adds -Wcast-qual to the compile flags
when ZLIBGCCWARN is set in the environment.
2012-08-13 00:02:40 -07:00
Mark Adler
bfac156463 Fix configure check for veracity of compiler error return codes.
There were two problems before that this fixes.  One was that the
check for the compiler error return code preceded the determination
of the compiler and its options.  The other was that the checks
for compiler and library characteristics could be fooled if the
error options were set to reject K&R-style C.  configure now aborts
if the compiler produces a hard error on K&R-style C.

In addition, aborts of configure are now consistent, and remove
any temporary files.
2012-06-09 23:17:07 -07:00
Mark Adler
977e108047 Delete "--version" file if created by "ar --version" [Richard G.]. 2012-06-09 22:59:54 -07:00
Mark Adler
148b8f630c Cleaner check for whether libtool is Apple or not on Darwin. 2012-06-09 22:59:53 -07:00
Mark Adler
a72bcd5607 On Darwin, only use /usr/bin/libtool if libtool is not Apple.
The original change was to always use /usr/bin/libtool on Darwin,
in order to avoid using a GNU libtool installed by the user in the
path ahead of Apple's libtool.  However someone might install a
more recent Apple libtool ahead of /usr/bin/libtool.  This commit
checks to see if libtool is Apple, and uses /usr/bin/libtool if it
isn't.
2012-06-09 19:15:36 -07:00
Mark Adler
dee3d4ae36 Force the native libtool in Mac OS X to avoid GNU libtool [Beebe]. 2012-05-01 21:17:08 -07:00
Mark Adler
dbcdbf8c41 Fix location of executable for finding a four-byte integer. 2012-04-29 19:20:05 -07:00
Mark Adler
6c9bd474aa Fix type mismatch between get_crc_table() and crc_table.
crc_table is made using a four-byte integer (when that can be
determined).  However get_crc_table() returned a pointer to an
unsigned long, which could be eight bytes.  This fixes that by
creating a new z_crc_t type for the crc_table.

This type is also used for the BYFOUR crc calculations that depend
on a four-byte type.  The four-byte type can now be determined by
./configure, which also solves a problem where ./configure --solo
would never use BYFOUR.  No the Z_U4 #define indicates that four-
byte integer was found either by ./configure or by zconf.h.
2012-04-29 16:18:12 -07:00
Mark Adler
cc538ebf79 Remove -R. from Solaris shared build (possible security issue). 2012-04-22 18:41:11 -07:00
Mark Adler
6635b78987 Update ./configure for Solaris, support --64 [Mooney]. 2012-04-22 18:27:41 -07:00
Mark Adler
3fb77ac08b Add more comments to configure. 2012-04-01 08:49:00 -07:00
Mark Adler
a3881cc745 Recognize clang as gcc. 2012-03-14 23:14:13 -07:00
Mark Adler
dab7531ecc Simplify test and use of gcc hidden attribute. 2012-03-03 00:20:00 -08:00
Mark Adler
3f4339b61b Improve the detection of no hidden visibility attribute. 2012-02-19 23:33:10 -08:00
Mark Adler
6838df9246 Test for existence of strerror.
SunOS 4.1 claims that it is __STDC__, but it does not have strerror
in string.h.  Instead of using __STDC__, this puts a direct test
for strerror in configure, and uses that information in gzguts.h.
2012-02-18 13:55:09 -08:00
Mark Adler
2dadd2fab4 Use name in GCC_CLASSIC as C compiler for coverage testing, if set.
Apple removed support for gcov in the default gcc compiler chain,
when they moved to llvm.  This can be circumvented in XCode 4.2 by
using the gcc chain with gcc-4.2.  This patch allows setting
GCC_CLASSIC to the name of a real gcc executable (e.g. "gcc-4.2")
to allow coverage testing.
2012-02-04 10:00:48 -08:00
Mark Adler
5461db945c Use the -m option on ldconfig for BSD systems [Tobias]. 2012-01-29 09:48:11 -08:00
Mark Adler
520561c577 Add the generation of configure.log by ./configure. 2012-01-28 14:48:50 -08:00
Mark Adler
2d55657c03 Have ./configure use the compiler return code for error indication.
Previously ./configure would use any output on stderr as an indication
that the compilation failed.  However if some compiler wrapper uses
stderr for some other purpose, e.g. distcc for nodes going down, then
./configure would not properly configure the build.  This problem was
noted by Mike Frysinger.  For backwards compatibility, ./configure
will revert to the old way, i.e. checking for anything on stderr, if
when it deliberately runs the compiler with an error, a zero exit
status is returned.
2012-01-16 16:44:40 -08:00
Mark Adler
d169dd7300 Split off AR options in Makefile.in and configure.
Adds ARFLAGS variable for options, where AR is now just the command
name.  So now $(AR) $(ARFLAGS) is used to build the static library.
2011-11-13 13:04:26 -08:00