configure.ac |   23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

New commits:
commit 22adf4e70a4b4a8d188909f39b386e738e3cd37e
Author: Andrzej J.R. Hunt <andr...@ahunt.org>
Date:   Tue Jul 16 18:30:51 2013 +0100

    Teach configure about distro-packaged external firebird.
    
    Distros seem to omit fb_config when packaging firebird,
    pkg-config can be used instead.
    
    Change-Id: I12e5c5892fcdc5de25835f210ebbb941433f2f44

diff --git a/configure.ac b/configure.ac
index a08fafe..b8c5db8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8108,21 +8108,26 @@ if test "x$enable_firebird_sdbc" = "xyes"; then
         SYSTEM_FIREBIRD=YES
         AC_PATH_PROG(FIREBIRDCONFIG, [fb_config])
         if test -z "$FIREBIRDCONFIG"; then
-            AC_MSG_ERROR([fb_config is missing. Install Firebird package.])
+            AC_MSG_NOTICE([No fb_config -- using pkg-config])
+            FIREBIRD_VERSION=`pkg-config --modversion fbembed`
+            AC_MSG_CHECKING([for Firebird Client library])
+            FIREBIRD_CFLAGS=`pkg-config --cflags fbembed`
+            FIREBIRD_LIBS=`pkg-config --libs fbembed`
+        else
+            AC_MSG_NOTICE([fb_config found])
+            FIREBIRD_VERSION=`$FIREBIRDCONFIG --version`
+            AC_MSG_CHECKING([for Firebird Client library])
+            FIREBIRD_CFLAGS=`$FIREBIRDCONFIG --cflags`
+            FIREBIRD_LIBS=`$FIREBIRDCONFIG --embedlibs`
         fi
         AC_MSG_CHECKING([Firebird version])
-        FIREBIRD_VERSION=`$FIREBIRDCONFIG --version`
-        FIREBIRD_MAJOR=`$FIREBIRDCONFIG --version | cut -d"." -f1`
-        FIREBIRD_MINOR=`$FIREBIRDCONFIG --version | cut -d"." -f2`
+        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
             AC_MSG_RESULT([OK])
         else
-            AC_MSG_ERROR([use 2.5.x])
+            AC_MSG_ERROR([Ensure firebird 2.5.x is installed])
         fi
-        AC_MSG_CHECKING([for Firebird Client library])
-        FIREBIRD_CFLAGS=`$FIREBIRDCONFIG --cflags`
-        FIREBIRD_LIBS=`$FIREBIRDCONFIG --embedlibs`
-        dnl FIREBIRD_LIBS=`$FIREBIRDCONFIG --libs`
         AC_MSG_RESULT([includes $FIREBIRD_CFLAGS, libraries $FIREBIRD_LIBS])
     else
         AC_MSG_RESULT([internal])
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to