From 2ded0a895302a1863baa275544b44e04298c0d2d Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 24 Feb 2010 10:13:22 -0800 Subject: [PATCH] Fix zlib problem introduced by linking against gnulib's crc32() function. Diagnosed by John Darrington. --- configure.ac | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/configure.ac b/configure.ac index 4d6cab7c22..97dbbcf4f0 100644 --- a/configure.ac +++ b/configure.ac @@ -145,6 +145,18 @@ AC_CHECK_HEADERS( [HAVE_ZLIB=no PSPP_OPTIONAL_PREREQ([zlib])]) +dnl Avoid interference between zlib's crc32() function and gnulib's +dnl crc32() function, which have different signatures. PSPP calls +dnl only gnulib's crc32() directly, but it calls zlib's crc32() +dnl indirectly through other zlib calls. If we don't rename gnulib's +dnl crc32(), then zlib will call gnulib's version instead of its own, +dnl causing failures. +if test $HAVE_ZLIB = yes; then + AC_DEFINE( + [crc32], [gl_crc32], + [Avoid making zlib call gnulib's crc32() instead of its own.]) +fi + dnl Gnumeric support requires libxml2 and zlib. if test $HAVE_LIBXML2 = yes && test $HAVE_ZLIB = yes; then GNM_SUPPORT=yes -- 2.30.2