summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorCaolán McNamara <cmc@openoffice.org>2009-11-19 20:39:52 +0000
committerCaolán McNamara <cmc@openoffice.org>2009-11-19 20:39:52 +0000
commitda8ef83f41bee5a4f68c53ed34b292d1807ee606 (patch)
tree97a20bc9b0e4721865509d010debe320cd329f9d /configure.in
parent867b9406d220830960f79de3021d34445c8a8fcd (diff)
cmcfixes67: #i107058#: make system db test faster, and extend to all >= 4.1
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in17
1 files changed, 3 insertions, 14 deletions
diff --git a/configure.in b/configure.in
index e41fa919e752..b29bec95b2b6 100644
--- a/configure.in
+++ b/configure.in
@@ -3843,25 +3843,14 @@ if test -n "$with_system_db" -o -n "$with_system_libs" && \
], []
)
AC_MSG_CHECKING([whether db is at least 4.1])
- for v in `seq 1 7`; do
- AC_TRY_RUN([
+ AC_TRY_RUN([
#include <db.h>
int main(int argc, char **argv) {
- if(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == $v) return 0;
+ if(DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)) return 0;
else return 1;
}
- ], [DB_VERSION_MINOR=$v], [])
- done
- if test "$DB_VERSION_MINOR" -gt "1"; then
- AC_MSG_RESULT([OK])
- DB_VERSION=4.$DB_VERSION_MINOR
- else
- AC_MSG_ERROR([no. you need at least db 4.1])
- fi
- # does not work :/
- #AC_CHECK_LIB(db, db_create, [],
- # [AC_MSG_ERROR([db library not installed or functional])], [])
+ ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no. you need at least db 4.1])])
AC_HAVE_LIBRARY(db, [],
[AC_MSG_ERROR([db not installed or functional])], [])
SCPDEFS="$SCPDEFS -DSYSTEM_DB"