Skip to content

Commit

Permalink
configure.ac: Not all pkg-config support PKG_CHECK_MODULES_STATIC
Browse files Browse the repository at this point in the history
PKG_CHECK_MODULES_STATIC is only supported by pkg-config > 0.29

Use pkg-config --static instead.
  • Loading branch information
mrdeep1 committed Jul 25, 2024
1 parent 4851806 commit 9656876
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -520,12 +520,15 @@ if test "x$build_dtls" = "xyes"; then
# Attempt to find MbedTLS using pkg-config.

# When statically linking against libcoap, all transitive dependencies need to be specified as linker flags
# as well. Use PKG_CHECK_MODULES_STATIC for that.
# as well. Use pkg-config --static for that.
if test "x$enable_static" = "xyes"; then
PKG_CHECK_MODULES_STATIC([MbedTLS],
[mbedtls],
[have_mbedtls="yes"; mbedtls_has_pkgconfig="yes"],
[have_mbedtls="no"; mbedtls_has_pkgconfig="no"])
KEEP_PKG_CONFIG=$PKG_CONFIG
PKG_CONFIG="$PKG_CONFIG --static"
PKG_CHECK_MODULES([MbedTLS],
[mbedtls],
[have_mbedtls="yes"; mbedtls_has_pkgconfig="yes"],
[have_mbedtls="no"; mbedtls_has_pkgconfig="no"])
PKG_CONFIG=$KEEP_PKG_CONFIG
else
PKG_CHECK_MODULES([MbedTLS],
[mbedtls],
Expand Down

0 comments on commit 9656876

Please sign in to comment.