libreoffice/libreoffice-firebird3.patch

66 lines
2.9 KiB
Diff

From: Michal Kubecek <mkubecek@suse.cz>
Date: Thu, 2 Jun 2016 08:12:37 +0200
Subject: configure.ac: allow build with Firebird 3.0
Patch-mainline: Not tagged yet (5.3.0.0.alpha1?)
Git-commit: e5d48f12faec6027bf79411cb69111d90f4e4129
References: bsc#982485
Relax the checks in configure.ac to allow building against recently
released Firebird 3.0. In this version, libfbclient is also used to
access local database files (embedded server mode) rather than
separate libfbembed.
Change-Id: Id498cbca22409f95ee299a6165cc765efa25eca7
Reviewed-on: https://gerrit.libreoffice.org/25845
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
---
configure.ac | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index ebca3bab7665..6abeae315c2e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8653,8 +8653,10 @@ if test "$enable_firebird_sdbc" = "yes" ; then
AC_PATH_PROG(FIREBIRDCONFIG, [fb_config])
if test -z "$FIREBIRDCONFIG"; then
AC_MSG_NOTICE([No fb_config -- using pkg-config])
- PKG_CHECK_MODULES(FIREBIRD, fbembed)
- FIREBIRD_VERSION=`pkg-config --modversion fbembed`
+ PKG_CHECK_MODULES([FIREBIRD], [fbclient >= 3], [FIREBIRD_PKGNAME=fbclient], [
+ PKG_CHECK_MODULES([FIREBIRD], [fbembed], [FIREBIRD_PKGNAME=fbembed])
+ ])
+ FIREBIRD_VERSION=`pkg-config --modversion "$FIREBIRD_PKGNAME"`
else
AC_MSG_NOTICE([fb_config found])
FIREBIRD_VERSION=`$FIREBIRDCONFIG --version`
@@ -8669,19 +8671,20 @@ if test "$enable_firebird_sdbc" = "yes" ; then
if test -n "${FIREBIRD_VERSION}"; then
FIREBIRD_MAJOR=`echo $FIREBIRD_VERSION | cut -d"." -f1`
FIREBIRD_MINOR=`echo $FIREBIRD_VERSION | cut -d"." -f2`
- if test "$FIREBIRD_MAJOR" -eq "2" -a "$FIREBIRD_MINOR" -eq "5"; then
+ if test "$FIREBIRD_MAJOR" -eq "2" -a "$FIREBIRD_MINOR" -eq "5" -o \
+ "$FIREBIRD_MAJOR" -eq "3" -a "$FIREBIRD_MINOR" -eq "0"; then
AC_MSG_RESULT([OK])
else
- AC_MSG_ERROR([Ensure firebird 2.5.x is installed])
+ AC_MSG_ERROR([Ensure firebird 2.5.x or 3.0.x is installed])
fi
else
__save_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} ${FIREBIRD_CFLAGS}"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <ibase.h>
-#if defined(FB_API_VER) && FB_API_VER == 25
+#if defined(FB_API_VER) && (FB_API_VER == 25 || FB_API_VER == 30)
#else
#error "Wrong Firebird API version"
-#endif]])],AC_MSG_RESULT([OK]),AC_MSG_ERROR([Ensure firebird 2.5.x is installed]))
+#endif]])],AC_MSG_RESULT([OK]),AC_MSG_ERROR([Ensure firebird 2.5.x or 3.0.x is installed]))
CFLAGS="${__save_CFLAGS}"
fi
ENABLE_FIREBIRD_SDBC="TRUE"
--
2.9.0