summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-07-23 10:06:54 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2013-07-23 10:08:49 +0200
commit19a6c484c3af376416398e78ac29db5aa9a235ce (patch)
tree3ddce5c19ae30c64a608e474b34cf2d664c365c0 /configure.ac
parent61eed5f1b9889ba3b6c0e484f0847cdf52ab3871 (diff)
configure.ac: working firebird version check with manual FIREBIRD_C/LDFLAGS
Change-Id: I511eb8bfcfab2d42073f43660518e1e8be0d5788
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 17 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 1147e4dddf37..f1fc3d18809c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8159,15 +8159,26 @@ if test "x$enable_firebird_sdbc" = "xyes"; then
FIREBIRD_CFLAGS=`$FIREBIRDCONFIG --cflags`
FIREBIRD_LIBS=`$FIREBIRDCONFIG --embedlibs`
fi
+ AC_MSG_RESULT([includes `$FIREBIRD_CFLAGS', libraries `$FIREBIRD_LIBS'])
AC_MSG_CHECKING([Firebird version])
- 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])
+ 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
+ AC_MSG_RESULT([OK])
+ else
+ AC_MSG_ERROR([Ensure firebird 2.5.x is installed])
+ fi
else
- AC_MSG_ERROR([Ensure firebird 2.5.x is installed])
+ __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
+#else
+#error "Wrong Firebird API version"
+#endif]])],AC_MSG_RESULT([OK]),AC_MSG_ERROR([Ensure firebird 2.5.x is installed]))
+ CFLAGS="${__save_CFLAGS}"
fi
- AC_MSG_RESULT([includes $FIREBIRD_CFLAGS, libraries $FIREBIRD_LIBS])
ENABLE_FIREBIRD_SDBC="TRUE"
elif test "$enable_database_connectivity" != yes; then
AC_MSG_RESULT([none])