From: Ben Pfaff Date: Wed, 24 Feb 2010 18:13:22 +0000 (-0800) Subject: Fix zlib problem introduced by linking against gnulib's crc32() function. X-Git-Tag: v0.7.5~131 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ded0a895302a1863baa275544b44e04298c0d2d;p=pspp-builds.git Fix zlib problem introduced by linking against gnulib's crc32() function. Diagnosed by John Darrington. --- diff --git a/configure.ac b/configure.ac index 4d6cab7c..97dbbcf4 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