Skip to content

Commit 294ec34

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
2 parents 5bdadcf + 876f162 commit 294ec34

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

cmake/ext/dba/CMakeLists.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)