diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2019-04-10 22:06:11 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2019-04-10 22:34:50 +0200 |
commit | 42440dcf572546875a472f21cc98750bb89bd8ca (patch) | |
tree | 0c08cafaddc7793c0122ca839aa444a13f279b9e | |
parent | 1d4372367c56ae167e4c8c70f96cf0e9246d8a1a (diff) |
libax25io: Link against zlib, if available.
So far only the presence of the zlib.h header was being tested and used if
present but the result was never linked against libz. This means the
resulting libax25io library had no DT_NEEDED tag so linking a libax25io
built with zlib support into an application which itself wasn't being
linked against zlib would result in a link errror. Whops.
In the dark past the issue must have been noticed but it was papered over
for the node package by linking against zlib, if present. This might fail
if libax25io was built with zlib compression support but ax25-tools is
being built on a system without zlib.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | configure.ac | 4 |
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) |