Changes from 1.0.0-stable.
diff --git a/Configure b/Configure
index ae8ce89..8f9f2de 100755
--- a/Configure
+++ b/Configure
@@ -1218,7 +1218,14 @@
 	$cflags = "-DZLIB $cflags";
 	if (defined($disabled{"zlib-dynamic"}))
 		{
-		$lflags = "$lflags -lz";
+		if (defined($withargs{"zlib-lib"}))
+			{
+			$lflags = "$lflags -L" . $withargs{"zlib-lib"} . " -lz";
+			}
+		else
+			{
+			$lflags = "$lflags -lz";
+			}
 		}
 	else
 		{