[Libreoffice-commits] core.git: configure.ac
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Mar 5 14:08:59 UTC 2019
configure.ac | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
New commits:
commit 6d471576114ff10e9e27006e7a9a886207971be0
Author: Tomáš Chvátal <tchvatal at suse.com>
AuthorDate: Tue Mar 5 11:33:44 2019 +0100
Commit: Tomáš Chvátal <tchvatal at suse.cz>
CommitDate: Tue Mar 5 15:08:34 2019 +0100
Use pkgconfig to detect PostgreSQL if there is no pg_config
pg_config is meant for linking server extensions,
clients should use pkg-config instead to build against libpq.
This fixes build with PostgreSQL 11.
Change-Id: Ic0b5fc9cb7169f44c00a1edf7218212c360ec235
Reviewed-on: https://gerrit.libreoffice.org/68734
Tested-by: Jenkins
Reviewed-by: Tomáš Chvátal <tchvatal at suse.cz>
diff --git a/configure.ac b/configure.ac
index a3855d24546e..c4d789140362 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8814,11 +8814,17 @@ if test "x$enable_postgresql_sdbc" != "xno"; then
done
fi
AC_PATH_PROG(PGCONFIG, pg_config, ,$PATH$pg_supp_path)
- if test -z "$PGCONFIG"; then
- AC_MSG_ERROR([pg_config needed; set PGCONFIG if not in PATH])
+ if test -n "$PGCONFIG"; then
+ POSTGRESQL_INC=-I$(${PGCONFIG} --includedir)
+ POSTGRESQL_LIB="-L$(${PGCONFIG} --libdir)"
+ else
+ PKG_CHECK_MODULES(POSTGRESQL, libpq, [
+ POSTGRESQL_INC=$POSTGRESQL_CFLAGS
+ POSTGRESQL_LIB=$POSTGRESQL_LIBS
+ ],[
+ AC_MSG_ERROR([pg_config or 'pkg-config libpq' needed; set PGCONFIG if not in PATH])
+ ])
fi
- POSTGRESQL_INC=-I$(${PGCONFIG} --includedir)
- POSTGRESQL_LIB="-L$(${PGCONFIG} --libdir)"
FilterLibs "${POSTGRESQL_LIB}"
POSTGRESQL_LIB="${filteredlibs}"
else
More information about the Libreoffice-commits
mailing list