From: Michael Wallner Date: Fri, 7 Oct 2022 07:18:33 +0000 (+0200) Subject: configure: fix func check in -lpq X-Git-Tag: v2.2.1~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=85d695ab921311a696eeb85329fb0a9b1afb8771;p=m6w6%2Fext-pq configure: fix func check in -lpq --- diff --git a/config9.m4 b/config9.m4 index 6877c85..d3fb2b2 100644 --- a/config9.m4 +++ b/config9.m4 @@ -76,19 +76,22 @@ if test "$PHP_PQ" != "no"; then dnl PQ_CHECK_FUNC(sym, fail-hard) dnl AC_DEFUN([PQ_CHECK_FUNC], [ + PQ_SYM=$1 FAIL_HARD=$2 - + save_LIBS="$LIBS" + LIBS= PHP_CHECK_LIBRARY(pq, $1, [ AC_DEFINE([HAVE_]translit($1,a-z,A-Z), 1, Have $1) ], [ if test -n "$FAIL_HARD"; then - if "$FAIL_HARD"; then - AC_MSG_ERROR(could not find $PQ_SYM in -lpq) + if $FAIL_HARD; then + AC_MSG_ERROR(could not find $PQ_SYM in -lpq -L$PQ_LIBDIR) fi fi ], [ -L$PQ_LIBDIR ]) + LIBS="$save_LIBS" ]) PQ_CHECK_FUNC(PQregisterEventProc, true)