From bec53e1bc6c4879ba1bf06846eed508fb36a7c2e Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Fri, 16 Oct 2026 11:27:28 +0000 Subject: [PATCH] Use pkg-config to get compiler and linker flags for libcurl Using pkg-config is generally the preferred method for getting dependency flags. In order to manipulate the pkg-config search path, you can set PKG_CONFIG_PATH. Typically, system paths are searched by default. Signed-off-by: Tristan Partin --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 51a1386..1427b42 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ MODULE_big = pg_tracing DATA = pg_tracing--0.1.0.sql PGFILEDESC = "pg_tracing - Distributed Tracing for PostgreSQL" -SHLIB_LINK = -lcurl +PG_CPPFLAGS = $(shell pkg-config --cflags libcurl 2>/dev/null) +SHLIB_LINK = $(shell pkg-config --libs libcurl 2>/dev/null || echo -lcurl) PG_CFLAGS = -Werror include common.mk