File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,29 @@ if(EXT_DBA_DB)
265265 )
266266 target_link_libraries (php_dba PRIVATE BerkeleyDB::BerkeleyDB)
267267
268+ # Check whether the Berkeley DB version is supported by PHP.
269+ get_target_property (type php_dba TYPE )
270+ if (
271+ BerkeleyDB_VERSION VERSION_GREATER_EQUAL 4.1
272+ AND BerkeleyDB_VERSION VERSION_LESS 4.1.25
273+ )
274+ message (
275+ FATAL_ERROR
276+ "Berkeley DB version ${BerkeleyDB_VERSION} is not supported. Supported "
277+ "versions are earlier than 4.1 or 4.1.25 and newer."
278+ )
279+ elseif (
280+ type MATCHES "^(MODULE|SHARED)_LIBRARY$"
281+ AND BerkeleyDB_VERSION VERSION_LESS 3.3
282+ )
283+ message (
284+ FATAL_ERROR
285+ "When building dba extension as shared, at least Berkeley DB version 3.3 "
286+ "is required. Found Berkeley DB version ${BerkeleyDB_VERSION} . Either "
287+ "the Berkeley DB should be upgraded or set the 'EXT_DBA_SHARED' to 'OFF'."
288+ )
289+ endif ()
290+
268291 if (BerkeleyDB_DB1_INCLUDE_DIR)
269292 set (DB1_INCLUDE_FILE "<db_185.h>" )
270293 set (DBA_DB1 1)
You can’t perform that action at this time.
0 commit comments