diff src/Makefile.am @ 393:ffbb5e3f2551

Add missing linking with zlib and libpthread/librt The uncompress and sem_* functions are used by various parts of the code but the files built from that code were not linked with zlib/pthread/rt. This fixes building with the --no-add-needed linker option. Fixes: https://bugs.debian.org/604796
author Paul Wise <pabs3@bonedaddy.net>
date Mon, 23 Dec 2019 12:23:22 +0800
parents 54465fca8b9e
children
line wrap: on
line diff
--- a/src/Makefile.am	Mon Dec 23 12:23:22 2019 +0800
+++ b/src/Makefile.am	Mon Dec 23 12:23:22 2019 +0800
@@ -12,7 +12,7 @@
 
 
 if STATIC_TOOLS
-    PSTLIB = @PST_OBJDIR@/libpst.a
+    PSTLIB = @PST_OBJDIR@/libpst.a @ZLIB_LIBS@ $(SEM_LIBS)
 else
     PSTLIB = libpst.la
 endif
@@ -80,7 +80,7 @@
 endif
 
 libpst_la_SOURCES     = $(common_source) $(common_header)
-libpst_la_LIBADD      = $(LTLIBICONV)
+libpst_la_LIBADD      = $(LTLIBICONV) @ZLIB_LIBS@ $(SEM_LIBS)
 
 EXTRA_DIST =
 if !NEED_XGETOPT
@@ -92,7 +92,7 @@
 
 # the library search path.
 lspst_LDADD       = $(all_libraries) $(PSTLIB) $(LTLIBICONV) @ZLIB_LIBS@
-readpst_LDADD     = $(all_libraries) $(PSTLIB) $(LTLIBICONV) $(REGEXLIB) $(GSF_LIBS) @ZLIB_LIBS@
+readpst_LDADD     = $(all_libraries) $(PSTLIB) $(LTLIBICONV) $(REGEXLIB) $(GSF_LIBS) @ZLIB_LIBS@ $(SEM_LIBS)
 pst2ldif_LDADD    = $(all_libraries) $(PSTLIB) $(LTLIBICONV) @ZLIB_LIBS@
 pst2dii_LDADD     = $(all_libraries) $(PSTLIB) $(LTLIBICONV) -lgd @ZLIB_LIBS@
 deltasearch_LDADD = $(all_libraries) $(PSTLIB) $(LTLIBICONV) @ZLIB_LIBS@