diff --git a/src/modules/Gz/configure.in b/src/modules/Gz/configure.in
index 2b45a60b5ef6d906178040648286f531cddf6d1a..af5acb6c32c329357f3625ca5f2d7aead51fcf78 100644
--- a/src/modules/Gz/configure.in
+++ b/src/modules/Gz/configure.in
@@ -11,10 +11,7 @@ if test x$with_zlib = xyes ; then
     AC_TRY_LINK([
 #include <zlib.h>
     ],[
-int main(int argc, char **argv)
-{
-  return((Z_NO_COMPRESSION|Z_VERSION_ERROR) & 0);
-}
+int foo = (int)(Z_NO_COMPRESSION | Z_VERSION_ERROR);
     ],[ AC_MSG_RESULT(yes) ],[ AC_MSG_RESULT(no); ac_cv_header_zlib_h=no ])
     if test $ac_cv_header_zlib_h = yes ; then
       AC_CHECK_LIB(z, compress, [