From cd35fe75e9602e71fb95c3d99f003921c482226e Mon Sep 17 00:00:00 2001 From: arowser Date: Sat, 16 Nov 2024 22:12:04 +0800 Subject: [PATCH] configure: Fix PostgreSQL detection and configuration --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 8c97ca5fb4a2..953c3947ec29 100755 --- a/configure +++ b/configure @@ -358,8 +358,8 @@ fi POSTGRES_INCLUDE="" POSTGRES_LDLIBS="" if command -v "${PG_CONFIG}" >/dev/null; then - POSTGRES_INCLUDE="-I$("${PG_CONFIG}" --includedir)" - POSTGRES_LDLIBS="-L$("${PG_CONFIG}" --libdir) -lpq" + POSTGRES_INCLUDE="$("${PKG_CONFIG}" --silence-errors --cflags libpq || :)" + POSTGRES_LDLIBS="$("${PKG_CONFIG}" --silence-errors --libs libpq || :)" fi # Clean up on exit.