diff --git a/configure.ac b/configure.ac
index 0f57268..a65361a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,6 +59,9 @@ AC_PROG_LIBTOOL
 dnl Check for math library
 AC_CHECK_LIB([m], [exp])
 
+dnl check for zlib
+AC_CHECK_LIB([z], [gzopen])
+
 dnl Check for <sys/time.h> header
 AC_CHECK_HEADER([sys/time.h],
    AC_DEFINE([HAVE_SYS_TIME_H], [1], [N/A]))
diff --git a/src/Makefile.am b/src/Makefile.am
index e48d416..0133da1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -16,8 +16,7 @@ libglpk_la_CPPFLAGS = \
 -I$(srcdir)/misc \
 -I$(srcdir)/mpl \
 -I$(srcdir)/proxy \
--I$(srcdir)/simplex \
--I$(srcdir)/zlib
+-I$(srcdir)/simplex
 
 libglpk_la_LDFLAGS = \
 -version-info 41:0:1 \
@@ -195,21 +194,6 @@ simplex/spxprim.c \
 simplex/spxprob.c \
 simplex/spychuzc.c \
 simplex/spychuzr.c \
-simplex/spydual.c \
-zlib/adler32.c \
-zlib/compress.c \
-zlib/crc32.c \
-zlib/deflate.c \
-zlib/gzclose.c \
-zlib/gzlib.c \
-zlib/gzread.c \
-zlib/gzwrite.c \
-zlib/inffast.c \
-zlib/inflate.c \
-zlib/inftrees.c \
-zlib/trees.c \
-zlib/uncompr.c \
-zlib/zio.c \
-zlib/zutil.c
+simplex/spydual.c
 
 ## eof ##
