1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
dnl $Id: db.m4,v 1.2 2004/02/14 21:16:18 cg2v Exp $
dnl
dnl tests for various db libraries
dnl
AC_DEFUN([rk_DB],[berkeley_db=db
AC_ARG_WITH(berkeley-db,
[ --without-berkeley-db if you don't want berkeley db],[
if test "$withval" = no; then
berkeley_db=""
fi
])
if test "$berkeley_db"; then
AC_CHECK_HEADERS([ \
db.h \
db_185.h \
])
fi
AC_FIND_FUNC_NO_LIBS2(dbopen, $berkeley_db, [
#include <stdio.h>
#if defined(HAVE_DB_185_H)
#include <db_185.h>
#elif defined(HAVE_DB_H)
#include <db.h>
#endif
],[NULL, 0, 0, 0, NULL])
AC_FIND_FUNC_NO_LIBS(dbm_firstkey, $berkeley_db gdbm ndbm)
AC_FIND_FUNC_NO_LIBS2(db_create, $berkeley_db, [
#include <stdio.h>
#if defined(HAVE_DB_H)
#include <db.h>
#endif
],[NULL, NULL, 0])
DBLIB="$LIB_dbopen"
if test "$LIB_dbopen" != "$LIB_db_create"; then
DBLIB="$DBLIB $LIB_db_create"
fi
if test "$LIB_dbopen" != "$LIB_dbm_firstkey"; then
DBLIB="$DBLIB $LIB_dbm_firstkey"
fi
AC_SUBST(DBLIB)dnl
])
|