X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=build%2Fopenldap.m4;h=32a52c7078168a5962b44c8c29b753fbfc192c0c;hb=dc650034cf4b978706b24ccf539bbba4e988c931;hp=2e0741444490487e4337c7750f04b2d5d5778146;hpb=afbd74c4de0dd14a7fbdf986c0aad2f0ed6e130a;p=openldap diff --git a/build/openldap.m4 b/build/openldap.m4 index 2e07414444..32a52c7078 100644 --- a/build/openldap.m4 +++ b/build/openldap.m4 @@ -2,7 +2,7 @@ dnl OpenLDAP Autoconf Macros dnl $OpenLDAP$ dnl This work is part of OpenLDAP Software . dnl -dnl Copyright 1998-2013 The OpenLDAP Foundation. +dnl Copyright 1998-2015 The OpenLDAP Foundation. dnl All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without @@ -328,7 +328,7 @@ AC_DEFUN([OL_BDB_HEADER_VERSION], #endif __db_version DB_VERSION_MAJOR ]) - set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none + set X `eval "$ac_cpp -P conftest.$ac_ext" | $EGREP __db_version` none none ol_cv_bdb_major=${3} ]) case $ol_cv_bdb_major in [[1-9]]*) : ;; *) @@ -344,7 +344,7 @@ AC_CACHE_CHECK([for Berkeley DB minor version in db.h], [ol_cv_bdb_minor],[ #endif __db_version DB_VERSION_MINOR ]) - set X `eval "$ac_cpp conftest.$ac_ext" | $EGREP __db_version` none none + set X `eval "$ac_cpp -P conftest.$ac_ext" | $EGREP __db_version` none none ol_cv_bdb_minor=${3} ]) case $ol_cv_bdb_minor in [[0-9]]*) : ;; *) @@ -547,12 +547,18 @@ AC_DEFUN([OL_BDB_COMPAT], #ifndef DB_VERSION_MINOR # define DB_VERSION_MINOR 0 #endif +#ifndef DB_VERSION_PATCH +# define DB_VERSION_PATCH 0 +#endif -#define DB_VERSION_MM ((DB_VERSION_MAJOR<<8)|DB_VERSION_MINOR) +#define DB_VERSION_FULL ((DB_VERSION_MAJOR<<16)|(DB_VERSION_MINOR<<8)|DB_VERSION_PATCH) -/* require 4.4 or later */ -#if DB_VERSION_MM >= 0x0404 +/* require 4.4 or later, but less than 6.0.20 */ +#if DB_VERSION_FULL >= 0x040400 && DB_VERSION_FULL < 0x060014 __db_version_compat +#endif +#if DB_VERSION_FULL >= 0x060014 +#error "BerkeleyDB 6.0.20+ license is incompatible with LDAP" #endif ], [ol_cv_bdb_compat=yes], [ol_cv_bdb_compat=no])]) ])