mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-01 14:15:49 +08:00
Moved db1/db.h check to the db1 marco in openldap.m4. Also added check for HAVE_DB1_DB_H for which header to include since it's only defined when using db1
This commit is contained in:
parent
74fa98dfa3
commit
d4f4f8f197
@ -258,7 +258,9 @@ dnl AC_CHECK_LIB(db,dbopen)
|
||||
dnl
|
||||
AC_DEFUN([OL_LIB_BERKELEY_DB],
|
||||
[AC_CACHE_CHECK([for Berkeley DB library], [ol_cv_lib_db],
|
||||
[ ol_LIBS="$LIBS"
|
||||
[
|
||||
AC_CHECK_HEADERS(db1/db.h)
|
||||
ol_LIBS="$LIBS"
|
||||
AC_CHECK_FUNC(dbopen,[ol_cv_lib_db=yes], [
|
||||
AC_CHECK_LIB(db1,dbopen,[ol_cv_lib_db=-ldb1],[
|
||||
AC_CHECK_LIB(db,dbopen,[ol_cv_lib_db=-ldb]
|
||||
|
@ -1225,7 +1225,7 @@ if test $ol_with_ldbm_api = manual ; then
|
||||
|
||||
AC_MSG_WARN([LDBM defines and link options must be set manually])
|
||||
|
||||
AC_CHECK_HEADERS(db1/db.h db.h db_185.h gdbm.h ndbm.h)
|
||||
AC_CHECK_HEADERS(db.h db_185.h gdbm.h ndbm.h)
|
||||
fi
|
||||
|
||||
if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
|
||||
|
@ -29,7 +29,11 @@
|
||||
#ifdef HAVE_DB_185_H
|
||||
# include <db_185.h>
|
||||
#else
|
||||
# include <db.h>
|
||||
# ifdef HAVE_DB1_DB_H
|
||||
# include <db1/db.h>
|
||||
# else
|
||||
# include <db.h>
|
||||
# endif
|
||||
# ifdef HAVE_BERKELEY_DB2
|
||||
# define R_NOOVERWRITE DB_NOOVERWRITE
|
||||
# define DEFAULT_DB_PAGE_SIZE 1024
|
||||
@ -87,7 +91,11 @@ LDAP_END_DECL
|
||||
#ifdef HAVE_DB_185_H
|
||||
# include <db_185.h>
|
||||
#else
|
||||
# include <db.h>
|
||||
# ifdef HAVE_DB1_DB_H
|
||||
# include <db1/db.h>
|
||||
# else
|
||||
# include <db.h>
|
||||
# endif
|
||||
# ifdef LDBM_USE_DB2
|
||||
# define R_NOOVERWRITE DB_NOOVERWRITE
|
||||
# define DEFAULT_DB_PAGE_SIZE 1024
|
||||
|
@ -396,6 +396,9 @@
|
||||
/* Define if you have the <db.h> header file. */
|
||||
#undef HAVE_DB_H
|
||||
|
||||
/* Define if you have the <db1/db.h> header file. */
|
||||
#undef HAVE_DB1_DB_H
|
||||
|
||||
/* Define if you have the <db_185.h> header file. */
|
||||
#undef HAVE_DB_185_H
|
||||
|
||||
|
@ -12,7 +12,11 @@
|
||||
#include "slap.h"
|
||||
#include "back-ldbm.h"
|
||||
|
||||
#include "db.h"
|
||||
#ifdef HAVE_DB1_DB_H
|
||||
# include <db1/db.h>
|
||||
#else
|
||||
# include <db.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_BERKELEY_DB2
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user