Skip to content

Commit

Permalink
Fix to really use libcurl from pkg-config
Browse files Browse the repository at this point in the history
Due to the convoluted nature of the Makefile.autosetup, an alternative libcurl was not picked up even with ./configure --with-libcurl, but a system provided -lcurl was linked against.
This commit refines previous Makefile changes that fixed pkg-config provided libraries for the hitherto undetected error.
  • Loading branch information
Keve authored and bapt committed Nov 12, 2024
1 parent 45c3522 commit 2cfb4f7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions libpkg/repo/binary/Makefile.autosetup
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ VPATH= $(top_srcdir)/libpkg/repo/binary
LOCAL_CFLAGS+= @PKG_LIBARCHIVE_CFLAGS@
@endif

@if HAVE_PKG_LIBCURL
LOCAL_CFLAGS+= @PKG_LIBCURL_CFLAGS@
@endif


include $(MK)/static-lib.mk
3 changes: 1 addition & 2 deletions src/Makefile.autosetup
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ OTHER_LIBS+= -lssl -lcrypto

@if PKG_LIBCURL_LIBS
LOCAL_CFLAGS+= @PKG_LIBCURL_CFLAGS@
LOCAL_LDFLAGS+= @PKG_LIBCURL_LDFLAGS@
OTHER_LIBS+= @PKG_LIBCURL_LIBS@
OTHER_LIBS+= @PKG_LIBCURL_LDFLAGS@ @PKG_LIBCURL_LIBS@
@endif

@if libmachista
Expand Down
4 changes: 3 additions & 1 deletion tests/Makefile.autosetup
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ LIBS+= @PKG_LIBARCHIVE_LDFLAGS@ @PKG_LIBARCHIVE_LIBS@
@else
LIBS+= -L/usr/lib -larchive -lbz2 -lz -llzma
@endif
OTHER_LIBS= -lssl -lcrypto -pthread
OTHER_LIBS= -pthread
@if HAVE_LIBUTIL
OTHER_LIBS+= -lutil
@endif
Expand All @@ -144,6 +144,8 @@ LIBS+= @PKG_LIBCURL_LDFLAGS@ @PKG_LIBCURL_LIBS@
@if PKG_OPENSSL_LIBS
CFLAGS+= @PKG_OPENSSL_CFLAGS@
LIBS+= @PKG_OPENSSL_LDFLAGS@ @PKG_OPENSSL_LIBS@
@else
OTHER_LIBS+= -lssl -lcrypto
@endif


Expand Down

0 comments on commit 2cfb4f7

Please sign in to comment.