--- configure.orig 2005-07-11 13:11:57.000000000 -0700 +++ configure 2005-07-26 14:49:15.000000000 -0700 @@ -96,7 +96,8 @@ SHAREDLIB=libz$shared_ext SHAREDLIBV=libz.$VER$shared_ext SHAREDLIBM=libz.$VER1$shared_ext - LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER"};; + LDSHARED=${LDSHARED-"$cc $cflags -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER"} + LDTEST=NO;; *) LDSHARED=${LDSHARED-"$cc -shared"};; esac else @@ -172,6 +173,7 @@ echo Checking for shared library support... # we must test in two steps (cc then ld), required at least on SunOS 4.x if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" && + test "$LDTEST" = "NO" || test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then CFLAGS="$SFLAGS" LIBS="$SHAREDLIBV"