libreoffice/libreoffice-postgresql.patch
Tomáš Chvátal 1302655a9c Accepting request 681672 from home:rmax:branches:LibreOffice:Factory
- libreoffice-postgresql.patch: pg_config is meant for linking
  server extensions, clients should use pkg-config instead to build
  against libpq. This fixes build with PostgreSQL 11.

OBS-URL: https://build.opensuse.org/request/show/681672
OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=760
2019-03-05 10:35:06 +00:00

25 lines
967 B
Diff

--- configure.ac.orig
+++ configure.ac
@@ -8669,11 +8669,17 @@ if test "x$enable_postgresql_sdbc" != "x
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