Package: zlib1g Version: 1:1.2.3.3.dfsg-12 zlib1g configure checks assume that compile fails if compiler outputs anything, assuming it is always error message. (This is ugly, and one may want to fix it properly.)
Compiler always gets "-fPIC", and when compiling for certain platforms (I encountered this when compiling with MinGW32), compiler gives warning "all code is position independent" meaning that "-fPIC" is not needed at all. Configure checks fail because this warning message. Attached patch checks against that situation, and avoids using "-fPIC" if it's not needed. For more info (and possible new versions of the patch) see http://vcust127.louhi.net/other/crosser/ - ML
diff -Nurd zlib/configure zlib/configure --- zlib/configure 2008-04-07 19:24:07.000000000 +0300 +++ zlib/configure 2008-04-07 19:29:26.000000000 +0300 @@ -80,7 +80,13 @@ if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then CC="$cc" - SFLAGS="${CFLAGS-"-O3"} -fPIC" + SFLAGS="${CFLAGS-"-O3"}" + + if ! $CC -c $CFLAGS -fPIC $test.c 2>&1 | + grep "all code is position independent" >/dev/null + then + SFLAGS="$SFLAGS -fPIC" + fi CFLAGS="${CFLAGS-"-O3"}" if test -z $uname; then uname=`(uname -s || echo unknown) 2>/dev/null`