--- configure
+++ configure
@@ -34052,7 +34052,7 @@
   rpathdirs=
   ltrpathdirs=
   names_already_handled=
-  names_next_round='ssl crypto z'
+  names_next_round='ssl crypto'; if test "x$ac_cv_lib_z_compress" = xyes; then names_next_round="${names_next_round} z"; fi
   while test -n "$names_next_round"; do
     names_this_round="$names_next_round"
     names_next_round=
