summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am1
-rw-r--r--configure.ac4
2 files changed, 4 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 0ff5f37..c24be86 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -57,6 +57,7 @@ libax25_la_SOURCES = \
libax25io_la_SOURCES = \
ax25io.c \
netax25/ax25io.h
+libax25io_la_LIBADD = @Z_LIB@
dist_man_MANS = ax25.3 rose.3 axports.5 rsports.5 nrports.5
diff --git a/configure.ac b/configure.ac
index dae1d94..0056313 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,9 @@ AC_CHECK_FUNCS(socket strdup strerror strspn)
dnl Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h sys/file.h sys/ioctl.h unistd.h zlib.h)
+AC_CHECK_HEADERS(fcntl.h sys/file.h sys/ioctl.h unistd.h)
+AC_CHECK_HEADER([zlib.h], AC_CHECK_LIB(z, zlibVersion,Z_LIB="-lz",Z_LIB=))
+AC_SUBST(Z_LIB, [$Z_LIB])
dnl Checks for working glibc 2.1 headers
AC_MSG_CHECKING(for working netax25/ax25.h header file)