[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FreeBSD with Berkeley DB4.1
From: |
Armin Wolfermann |
Subject: |
Re: FreeBSD with Berkeley DB4.1 |
Date: |
Fri, 10 Oct 2003 16:49:57 +0159 |
User-agent: |
Mutt/1.5.4i |
* Mark.Burgess@iu.hio.no <Mark.Burgess@iu.hio.no> [10.10.2003 16:16]:
> If someone who knows these secrets wants to encode the result into
> configure.ac this would help others,
This might help (only tested on FreeBSD with --with-berkeleydb=/usr/local):
--- configure.ac.orig Fri Oct 10 16:20:25 2003
+++ configure.ac Fri Oct 10 16:47:32 2003
@@ -131,14 +131,27 @@
if test "x$BERKELEY_DB_LIB" = "x" ; then
AC_MSG_ERROR(Cannot find BerkeleyDB)
fi
- elif test -f "$BERKELEY_DB_DIR/include/db.h";then
+ elif test -d "$BERKELEY_DB_DIR"; then
+
+ BERKELEY_DB_CFLAGS="-I$BERKELEY_DB_DIR/include"
+ for v in . db41 db40 db4 db33 db32 db3 db; do
+ if test -f "$BERKELEY_DB_DIR/include/$v/db.h"; then
+ BERKELEY_DB_CFLAGS="-I$BERKELEY_DB_DIR/include/$v"
+ fi
+ done
+
+ BERKELEY_DB_LIB="-ldb"
+ for v in db41 db40 db4 db33 db32 db3 db; do
+ if test -f "$BERKELEY_DB_DIR/lib/lib$v.so"; then
+ BERKELEY_DB_LIB="-l$v"
+ fi
+ done
+
case "$target_os" in
solaris*) BERKELEY_DB_LDFLAGS="-L$BERKELEY_DB_DIR/lib
-R$BERKELEY_DB_DIR/lib";;
*) BERKELEY_DB_LDFLAGS="-L$BERKELEY_DB_DIR/lib";;
esac
- BERKELEY_DB_CFLAGS="-I$BERKELEY_DB_DIR/include"
- BERKELEY_DB_LIB="-ldb"
AC_MSG_RESULT($BERKELEY_DB_DIR)
else
AC_MSG_ERROR(Cannot find BerkeleyDB)
Regards,
Armin Wolfermann