a5f7ab7
diff -up ./ext/dba/config.m4.libdb ./ext/dba/config.m4
a5f7ab7
--- ./ext/dba/config.m4.libdb	2020-04-09 14:06:11.000000000 +0200
a5f7ab7
+++ ./ext/dba/config.m4	2020-04-09 14:35:08.208605065 +0200
a5f7ab7
@@ -375,61 +375,13 @@ if test "$PHP_DB4" != "no"; then
Remi Collet ae198d2
   dbdp4="/usr/local/BerkeleyDB.4."
Remi Collet ae198d2
   dbdp5="/usr/local/BerkeleyDB.5."
Remi Collet ae198d2
   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
Remi Collet ae198d2
-    if test -f "$i/db5/db.h"; then
Remi Collet ae198d2
-      THIS_PREFIX=$i
Remi Collet ae198d2
-      THIS_INCLUDE=$i/db5/db.h
Remi Collet ae198d2
-      break
Remi Collet ae198d2
-    elif test -f "$i/db4/db.h"; then
Remi Collet ae198d2
-      THIS_PREFIX=$i
Remi Collet ae198d2
-      THIS_INCLUDE=$i/db4/db.h
Remi Collet ae198d2
-      break
2261b4f
-    elif test -f "$i/include/db5.3/db.h"; then
2261b4f
-      THIS_PREFIX=$i
2261b4f
-      THIS_INCLUDE=$i/include/db5.3/db.h
2261b4f
-      break
Remi Collet ae198d2
-    elif test -f "$i/include/db5.1/db.h"; then
Remi Collet ae198d2
-      THIS_PREFIX=$i
Remi Collet ae198d2
-      THIS_INCLUDE=$i/include/db5.1/db.h
Remi Collet ae198d2
-      break
Remi Collet ae198d2
-    elif test -f "$i/include/db5.0/db.h"; then
Remi Collet ae198d2
-      THIS_PREFIX=$i
Remi Collet ae198d2
-      THIS_INCLUDE=$i/include/db5.0/db.h
Remi Collet ae198d2
-      break
Remi Collet ae198d2
-    elif test -f "$i/include/db4.8/db.h"; then
Remi Collet ae198d2
-      THIS_PREFIX=$i
Remi Collet ae198d2
-      THIS_INCLUDE=$i/include/db4.8/db.h
Remi Collet ae198d2
-      break
Remi Collet ae198d2
-    elif test -f "$i/include/db4.7/db.h"; then
Remi Collet ae198d2
-      THIS_PREFIX=$i
Remi Collet ae198d2
-      THIS_INCLUDE=$i/include/db4.7/db.h
Remi Collet ae198d2
-      break
Remi Collet ae198d2
-    elif test -f "$i/include/db4.6/db.h"; then
Remi Collet ae198d2
-      THIS_PREFIX=$i
Remi Collet ae198d2
-      THIS_INCLUDE=$i/include/db4.6/db.h
Remi Collet ae198d2
-      break
Remi Collet ae198d2
-    elif test -f "$i/include/db4.5/db.h"; then
Remi Collet ae198d2
-      THIS_PREFIX=$i
Remi Collet ae198d2
-      THIS_INCLUDE=$i/include/db4.5/db.h
Remi Collet ae198d2
-      break
Remi Collet ae198d2
-    elif test -f "$i/include/db4/db.h"; then
Remi Collet ae198d2
-      THIS_PREFIX=$i
Remi Collet ae198d2
-      THIS_INCLUDE=$i/include/db4/db.h
Remi Collet ae198d2
-      break
Remi Collet ae198d2
-    elif test -f "$i/include/db/db4.h"; then
Remi Collet ae198d2
-      THIS_PREFIX=$i
Remi Collet ae198d2
-      THIS_INCLUDE=$i/include/db/db4.h
Remi Collet ae198d2
-      break
Remi Collet ae198d2
-    elif test -f "$i/include/db4.h"; then
Remi Collet ae198d2
-      THIS_PREFIX=$i
Remi Collet ae198d2
-      THIS_INCLUDE=$i/include/db4.h
Remi Collet ae198d2
-      break
Remi Collet ae198d2
-    elif test -f "$i/include/db.h"; then
Remi Collet ae198d2
+    if test -f "$i/include/db.h"; then
Remi Collet ae198d2
       THIS_PREFIX=$i
Remi Collet ae198d2
       THIS_INCLUDE=$i/include/db.h
Remi Collet ae198d2
       break
Remi Collet ae198d2
     fi
Remi Collet ae198d2
   done
2261b4f
-  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)])
Remi Collet ae198d2
+  PHP_DBA_DB_CHECK(4, db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
Remi Collet ae198d2
 fi
Remi Collet ae198d2
 PHP_DBA_STD_RESULT(db4,Berkeley DB4)
Remi Collet ae198d2
 
a5f7ab7
diff -up ./ext/dba/dba.c.libdb ./ext/dba/dba.c
a5f7ab7
--- ./ext/dba/dba.c.libdb	2020-04-09 14:06:11.000000000 +0200
a5f7ab7
+++ ./ext/dba/dba.c	2020-04-09 14:36:30.593275190 +0200
a5f7ab7
@@ -50,6 +50,10 @@
4d8d78d
 #include "php_lmdb.h"
a5f7ab7
 #include "dba_arginfo.h"
Remi Collet 77d120e
 
Remi Collet 77d120e
+#ifdef DB4_INCLUDE_FILE
Remi Collet 77d120e
+#include DB4_INCLUDE_FILE
Remi Collet 77d120e
+#endif
Remi Collet 77d120e
+
a5f7ab7
 PHP_MINIT_FUNCTION(dba);
a5f7ab7
 PHP_MSHUTDOWN_FUNCTION(dba);
a5f7ab7
 PHP_MINFO_FUNCTION(dba);
a5f7ab7
@@ -459,6 +463,10 @@ PHP_MINFO_FUNCTION(dba)
Remi Collet 77d120e
 
Remi Collet 77d120e
 	php_info_print_table_start();
Remi Collet 77d120e
  	php_info_print_table_row(2, "DBA support", "enabled");
Remi Collet 77d120e
+#ifdef DB_VERSION_STRING
Remi Collet 77d120e
+ 	php_info_print_table_row(2, "libdb header version", DB_VERSION_STRING);
Remi Collet 77d120e
+ 	php_info_print_table_row(2, "libdb library version", db_version(NULL, NULL, NULL));
Remi Collet 77d120e
+#endif
3920d6f
 	if (handlers.s) {
Remi Collet 77d120e
 		smart_str_0(&handlers);
3920d6f
 		php_info_print_table_row(2, "Supported handlers", ZSTR_VAL(handlers.s));