From: Mike Jerris Date: Thu, 19 May 2022 20:32:50 +0000 (-0600) Subject: [build] fix postgres detection on osx X-Git-Tag: v1.10.8^2~59^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=56ed4bbf5526e28aef14ebf53eec6c5672ae2afd;p=thirdparty%2Ffreeswitch.git [build] fix postgres detection on osx --- diff --git a/configure.ac b/configure.ac index baec8b2b83..4131e629a6 100644 --- a/configure.ac +++ b/configure.ac @@ -665,12 +665,13 @@ AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no]) case $host in *-darwin*) path_push_unique PKG_CONFIG_PATH /usr/local/opt/libpq/lib/pkgconfig + path_push_unique PKG_CONFIG_PATH /usr/local/opt/openssl/lib/pkgconfig ;; esac if test "$PKG_CONFIG" = "no" \ || test x"$enable_core_pgsql_pkgconfig" = x"no" \ - || ! pkg-config libpq; then + || ! pkg-config --modversion libpq > /dev/null; then if test "$PG_CONFIG" != "no"; then AC_MSG_CHECKING([for PostgreSQL libraries via pg_config]) POSTGRESQL_CFLAGS="-I`$PG_CONFIG --includedir`" @@ -682,7 +683,6 @@ if test "$PKG_CONFIG" = "no" \ POSTGRESQL_PATCH_VERSION=`$PG_CONFIG --version | awk '{ print $NF }' | awk -F. '{ print $3 }'` fi else - AC_MSG_CHECKING([for PostgreSQL libraries via pkg_config]) POSTGRESQL_CFLAGS="`$PKG_CONFIG --cflags libpq`" POSTGRESQL_LIBDIR="`$PKG_CONFIG libpq --libs-only-L`"