7f18ac
diff -up php-7.2.0alpha0/ext/dba/config.m4.libdb php-7.2.0alpha0/ext/dba/config.m4
7f18ac
--- php-7.2.0alpha0/ext/dba/config.m4.libdb	2017-05-29 08:56:06.000000000 +0200
7f18ac
+++ php-7.2.0alpha0/ext/dba/config.m4	2017-05-29 09:13:52.014823282 +0200
7f18ac
@@ -346,61 +346,13 @@ if test "$PHP_DB4" != "no"; then
7f18ac
   dbdp4="/usr/local/BerkeleyDB.4."
7f18ac
   dbdp5="/usr/local/BerkeleyDB.5."
7f18ac
   for i in $PHP_DB4 ${dbdp5}1 ${dbdp5}0 ${dbdp4}8 ${dbdp4}7 ${dbdp4}6 ${dbdp4}5 ${dbdp4}4 ${dbdp4}3 ${dbdp4}2 ${dbdp4}1 ${dbdp}0 /usr/local /usr; do
7f18ac
-    if test -f "$i/db5/db.h"; then
7f18ac
-      THIS_PREFIX=$i
7f18ac
-      THIS_INCLUDE=$i/db5/db.h
7f18ac
-      break
7f18ac
-    elif test -f "$i/db4/db.h"; then
7f18ac
-      THIS_PREFIX=$i
7f18ac
-      THIS_INCLUDE=$i/db4/db.h
7f18ac
-      break
7f18ac
-    elif test -f "$i/include/db5.3/db.h"; then
7f18ac
-      THIS_PREFIX=$i
7f18ac
-      THIS_INCLUDE=$i/include/db5.3/db.h
7f18ac
-      break
7f18ac
-    elif test -f "$i/include/db5.1/db.h"; then
7f18ac
-      THIS_PREFIX=$i
7f18ac
-      THIS_INCLUDE=$i/include/db5.1/db.h
7f18ac
-      break
7f18ac
-    elif test -f "$i/include/db5.0/db.h"; then
7f18ac
-      THIS_PREFIX=$i
7f18ac
-      THIS_INCLUDE=$i/include/db5.0/db.h
7f18ac
-      break
7f18ac
-    elif test -f "$i/include/db4.8/db.h"; then
7f18ac
-      THIS_PREFIX=$i
7f18ac
-      THIS_INCLUDE=$i/include/db4.8/db.h
7f18ac
-      break
7f18ac
-    elif test -f "$i/include/db4.7/db.h"; then
7f18ac
-      THIS_PREFIX=$i
7f18ac
-      THIS_INCLUDE=$i/include/db4.7/db.h
7f18ac
-      break
7f18ac
-    elif test -f "$i/include/db4.6/db.h"; then
7f18ac
-      THIS_PREFIX=$i
7f18ac
-      THIS_INCLUDE=$i/include/db4.6/db.h
7f18ac
-      break
7f18ac
-    elif test -f "$i/include/db4.5/db.h"; then
7f18ac
-      THIS_PREFIX=$i
7f18ac
-      THIS_INCLUDE=$i/include/db4.5/db.h
7f18ac
-      break
7f18ac
-    elif test -f "$i/include/db4/db.h"; then
7f18ac
-      THIS_PREFIX=$i
7f18ac
-      THIS_INCLUDE=$i/include/db4/db.h
7f18ac
-      break
7f18ac
-    elif test -f "$i/include/db/db4.h"; then
7f18ac
-      THIS_PREFIX=$i
7f18ac
-      THIS_INCLUDE=$i/include/db/db4.h
7f18ac
-      break
7f18ac
-    elif test -f "$i/include/db4.h"; then
7f18ac
-      THIS_PREFIX=$i
7f18ac
-      THIS_INCLUDE=$i/include/db4.h
7f18ac
-      break
7f18ac
-    elif test -f "$i/include/db.h"; then
7f18ac
+    if test -f "$i/include/db.h"; then
7f18ac
       THIS_PREFIX=$i
7f18ac
       THIS_INCLUDE=$i/include/db.h
7f18ac
       break
7f18ac
     fi
7f18ac
   done
7f18ac
-  PHP_DBA_DB_CHECK(4, db-5.3 db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
7f18ac
+  PHP_DBA_DB_CHECK(4, db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
7f18ac
 fi
7f18ac
 PHP_DBA_STD_RESULT(db4,Berkeley DB4)
7f18ac
 
7f18ac
diff -up php-7.2.0alpha0/ext/dba/dba.c.libdb php-7.2.0alpha0/ext/dba/dba.c
7f18ac
--- php-7.2.0alpha0/ext/dba/dba.c.libdb	2017-05-29 09:16:15.736628202 +0200
7f18ac
+++ php-7.2.0alpha0/ext/dba/dba.c	2017-05-29 09:16:20.494654746 +0200
7f18ac
@@ -53,6 +53,10 @@
7f18ac
 #include "php_tcadb.h"
7f18ac
 #include "php_lmdb.h"
7f18ac
 
7f18ac
+#ifdef DB4_INCLUDE_FILE
7f18ac
+#include DB4_INCLUDE_FILE
7f18ac
+#endif
7f18ac
+
7f18ac
 /* {{{ arginfo */
7f18ac
 ZEND_BEGIN_ARG_INFO_EX(arginfo_dba_popen, 0, 0, 2)
7f18ac
 	ZEND_ARG_INFO(0, path)
7f18ac
@@ -558,6 +562,10 @@ PHP_MINFO_FUNCTION(dba)
7f18ac
 
7f18ac
 	php_info_print_table_start();
7f18ac
  	php_info_print_table_row(2, "DBA support", "enabled");
7f18ac
+#ifdef DB_VERSION_STRING
7f18ac
+ 	php_info_print_table_row(2, "libdb header version", DB_VERSION_STRING);
7f18ac
+ 	php_info_print_table_row(2, "libdb library version", db_version(NULL, NULL, NULL));
7f18ac
+#endif
7f18ac
 	if (handlers.s) {
7f18ac
 		smart_str_0(&handlers);
7f18ac
 		php_info_print_table_row(2, "Supported handlers", ZSTR_VAL(handlers.s));