This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=aa37e818a53fcee8af4b61d2162f778f6be01dfa

commit aa37e818a53fcee8af4b61d2162f778f6be01dfa
Author: Guillem Jover <[email protected]>
AuthorDate: Sun Jan 28 23:12:26 2024 +0100

    build: Fix libdpkg library flags for static and dynamic linking
    
    We should always add the library dependencies to the LIBADD variable,
    regardless of whether we are building the library as static or shared,
    so that libtool can track them and use them on users, and so that we
    do not need to specify them for the programs linking against libdpkg.
---
 lib/dpkg/Makefile.am | 11 +++--------
 m4/dpkg-build.m4     |  1 -
 src/Makefile.am      |  8 --------
 3 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/lib/dpkg/Makefile.am b/lib/dpkg/Makefile.am
index 3fb27aa74..9ef3a37f7 100644
--- a/lib/dpkg/Makefile.am
+++ b/lib/dpkg/Makefile.am
@@ -48,19 +48,14 @@ EXTRA_libdpkg_la_DEPENDENCIES += \
 endif
 
 libdpkg_la_LIBADD = \
-       $(MD_LIBS) \
-       ../compat/libcompat.la \
-       # EOL
-
-if BUILD_SHARED
-libdpkg_la_LIBADD += \
-       $(LIBINTL) \
        $(Z_LIBS) \
        $(LZMA_LIBS) \
        $(ZSTD_LIBS) \
        $(BZ2_LIBS) \
+       $(MD_LIBS) \
+       $(LIBINTL) \
+       ../compat/libcompat.la \
        # EOL
-endif
 
 libdpkg_la_SOURCES = \
        dlist.h \
diff --git a/m4/dpkg-build.m4 b/m4/dpkg-build.m4
index 860d0d40e..74897f565 100644
--- a/m4/dpkg-build.m4
+++ b/m4/dpkg-build.m4
@@ -7,7 +7,6 @@ AC_DEFUN([DPKG_BUILD_SHARED_LIBS], [
   AS_IF([test "$enable_shared" = "yes" && test -z "$AUTHOR_TESTING"], [
     AC_MSG_ERROR([building libdpkg as a shared library is not supported])
   ])
-  AM_CONDITIONAL([BUILD_SHARED], [test "$enable_shared" = "yes"])
 ])# DPKG_BUILD_SHARED_LIBS
 
 # DPKG_BUILD_RELEASE_DATE()
diff --git a/src/Makefile.am b/src/Makefile.am
index 31d1a9e75..f40f2bc34 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -98,14 +98,6 @@ dpkg_deb_SOURCES = \
        deb/main.c \
        # EOL
 
-dpkg_deb_LDADD = \
-       $(LDADD) \
-       $(Z_LIBS) \
-       $(LZMA_LIBS) \
-       $(ZSTD_LIBS) \
-       $(BZ2_LIBS) \
-       # EOL
-
 dpkg_divert_SOURCES = \
        divert/main.c \
        # EOL

-- 
Dpkg.Org's dpkg

Reply via email to