Skip to content

Commit 156d8ff

Browse files
committed
Partially fix ext/dba
- Configuration options synced a bit further - Extension sources refactored - Find modules updated - Extension configuration improved for the *_INCLUDE_FILE macros
1 parent 4e0b8d3 commit 156d8ff

File tree

13 files changed

+266
-173
lines changed

13 files changed

+266
-173
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ jobs:
102102
libxslt1-dev \
103103
libcapstone-dev \
104104
libedit-dev \
105+
libcdb-dev \
106+
libgdbm-dev \
107+
libgdbm-compat-dev \
108+
liblmdb-dev \
109+
libtokyocabinet-dev \
105110
libsnmp-dev \
106111
snmpd \
107112
snmp-mibs-downloader \

cmake/cmake/modules/FindBerkeleyDB.cmake

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,24 @@ Module defines the following `IMPORTED` target(s):
55
66
* `BerkeleyDB::BerkeleyDB` - The package library, if found.
77
8-
Result variables:
8+
## Result variables
99
10-
`BerkeleyDB_FOUND`
11-
Whether the package has been found.
12-
`BerkeleyDB_INCLUDE_DIRS`
13-
Include directories needed to use this package.
14-
`BerkeleyDB_LIBRARIES`
15-
Libraries needed to link to the package library.
10+
* `BerkeleyDB_FOUND` - Whether the package has been found.
11+
* `BerkeleyDB_INCLUDE_DIRS`- Include directories needed to use this package.
12+
* `BerkeleyDB_LIBRARIES`- Libraries needed to link to the package library.
1613
17-
Cache variables:
14+
## Cache variables
1815
1916
* `BerkeleyDB_INCLUDE_DIR` - Directory containing package library headers.
2017
* `BerkeleyDB_LIBRARY` - The path to the package library.
2118
* `BerkeleyDB_DB1_INCLUDE_DIR` - Directory containing headers for DB1 emulation
2219
support in Berkeley DB.
2320
24-
Hints:
21+
## Hints
2522
26-
The `BerkeleyDB_ROOT` variable adds custom search path.
27-
28-
Set `BerkeleyDB_USE_DB1` to `TRUE` before calling `find_package(BerkeleyDB)` to
29-
enable the Berkeley DB 1.x support/emulation.
23+
* The `BerkeleyDB_ROOT` variable adds custom search path.
24+
* Set `BerkeleyDB_USE_DB1` to `TRUE` before calling `find_package(BerkeleyDB)`
25+
to enable the Berkeley DB 1.x support/emulation.
3026
#]=============================================================================]
3127

3228
include(CheckSourceCompiles)

cmake/cmake/modules/FindCdb.cmake

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ Module defines the following `IMPORTED` target(s):
55
66
* `Cdb::Cdb` - The package library, if found.
77
8-
Result variables:
8+
## Result variables
99
1010
* `Cdb_FOUND` - Whether the package has been found.
1111
* `Cdb_INCLUDE_DIRS` - Include directories needed to use this package.
1212
* `Cdb_LIBRARIES` - Libraries needed to link to the package library.
1313
* `Cdb_VERSION` - Package version, if found.
1414
15-
Cache variables:
15+
## Cache variables
1616
1717
* `Cdb_INCLUDE_DIR` - Directory containing package library headers.
1818
* `Cdb_LIBRARY` - The path to the package library.
1919
20-
Hints:
20+
## Hints
2121
22-
The `Cdb_ROOT` variable adds custom search path.
22+
* The `Cdb_ROOT` variable adds custom search path.
2323
#]=============================================================================]
2424

2525
include(CheckLibraryExists)
@@ -52,7 +52,13 @@ endif()
5252

5353
find_library(
5454
Cdb_LIBRARY
55-
NAMES cdb
55+
NAMES
56+
cdb
57+
# TODO: Which system still has cdb built in the default C library? In such
58+
# case this find module should be refactored to search the built-in library
59+
# similar to how FindIconv does it. Otherwise, more likely, this should be
60+
# removed from here.
61+
c
5662
PATHS ${PC_Cdb_LIBRARY_DIRS}
5763
DOC "The path to the cdb library"
5864
)

cmake/cmake/modules/FindDbm.cmake

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ Module defines the following `IMPORTED` target(s):
88
99
* `Dbm::Dbm` - The package library, if found.
1010
11-
Result variables:
11+
## Result variables
1212
1313
* `Dbm_FOUND` - Whether the package has been found.
1414
* `Dbm_INCLUDE_DIRS` - Include directories needed to use this package.
1515
* `Dbm_LIBRARIES` - Libraries needed to link to the package library.
1616
* `Dbm_IMPLEMENTATION` - String of the library name that implements the dbm
1717
library.
1818
19-
Cache variables:
19+
## Cache variables
2020
2121
* `Dbm_INCLUDE_DIR` - Directory containing package library headers.
2222
* `Dbm_LIBRARY` - The path to the package library.
2323
24-
Hints:
24+
## Hints
2525
26-
The `Dbm_ROOT` variable adds custom search path.
26+
* The `Dbm_ROOT` variable adds custom search path.
2727
#]=============================================================================]
2828

2929
include(CheckLibraryExists)
@@ -50,21 +50,22 @@ if(NOT Dbm_INCLUDE_DIR)
5050
string(APPEND _reason "dbm.h not found. ")
5151
endif()
5252

53-
# TODO: Fix the search names and the sanity check.
5453
find_library(
5554
Dbm_LIBRARY
56-
NAMES gdbm_compat
57-
DOC "The path to the dbm compat library"
55+
NAMES
56+
gdbm_compat
57+
dbm
58+
# TODO: Which system still has dbm built in the default C library? In such
59+
# case this find module should be refactored to search the built-in library
60+
# similar to how FindIconv does it. Otherwise, more likely, this should be
61+
# removed from here.
62+
c
63+
DOC "The path to the dbm library"
5864
)
5965

60-
if(Dbm_LIBRARY)
66+
if(Dbm_LIBRARY MATCHES "gdbm_compat")
6167
set(Dbm_IMPLEMENTATION "GDBM")
62-
else()
63-
find_library(
64-
Dbm_LIBRARY
65-
NAMES dbm c
66-
DOC "The path to the dbm library"
67-
)
68+
elseif(Dbm_LIBRARY)
6869
set(Dbm_IMPLEMENTATION "DBM")
6970
endif()
7071

cmake/cmake/modules/FindGDBM.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ Module defines the following `IMPORTED` target(s):
55
66
* `GDBM::GDBM` - The package library, if found.
77
8-
Result variables:
8+
## Result variables
99
1010
* `GDBM_FOUND` - Whether the package has been found.
1111
* `GDBM_INCLUDE_DIRS` - Include directories needed to use this package.
1212
* `GDBM_LIBRARIES` - Libraries needed to link to the package library.
1313
14-
Cache variables:
14+
## Cache variables
1515
1616
* `GDBM_INCLUDE_DIR` - Directory containing package library headers.
1717
* `GDBM_LIBRARY` - The path to the package library.
1818
19-
Hints:
19+
## Hints
2020
21-
The `GDBM_ROOT` variable adds custom search path.
21+
* The `GDBM_ROOT` variable adds custom search path.
2222
#]=============================================================================]
2323

2424
include(CheckLibraryExists)

cmake/cmake/modules/FindLMDB.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ Module defines the following `IMPORTED` target(s):
55
66
* `LMDB::LMDB` - The package library, if found.
77
8-
Result variables:
8+
## Result variables
99
1010
* `LMDB_FOUND` - Whether the package has been found.
1111
* `LMDB_INCLUDE_DIRS` - Include directories needed to use this package.
1212
* `LMDB_LIBRARIES` - Libraries needed to link to the package library.
1313
* `LMDB_VERSION` - Package version, if found.
1414
15-
Cache variables:
15+
## Cache variables
1616
1717
* `LMDB_INCLUDE_DIR` - Directory containing package library headers.
1818
* `LMDB_LIBRARY` - The path to the package library.
1919
20-
Hints:
20+
## Hints
2121
22-
The `LMDB_ROOT` variable adds custom search path.
22+
* The `LMDB_ROOT` variable adds custom search path.
2323
#]=============================================================================]
2424

2525
include(CheckLibraryExists)

cmake/cmake/modules/FindNdbm.cmake

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
#[=============================================================================[
22
Find the ndbm library.
33
4-
Depending on the system, the nbdm library can be part of other libraries as an
5-
interface.
4+
Depending on the system, the nbdm ("new" dbm) library can be part of other
5+
libraries as an interface. For example, GNU dbm library (GDBM) has a
6+
compatibility interface that provides ndbm.h header and gdbm_compat library.
67
78
Module defines the following `IMPORTED` target(s):
89
910
* `Ndbm::Ndbm` - The package library, if found.
1011
11-
Result variables:
12+
## Result variables
1213
1314
* `Ndbm_FOUND` - Whether the package has been found.
1415
* `Ndbm_INCLUDE_DIRS` - Include directories needed to use this package.
1516
* `Ndbm_LIBRARIES` - Libraries needed to link to the package library.
1617
17-
Cache variables:
18+
## Cache variables
1819
1920
* `Ndbm_INCLUDE_DIR` - Directory containing package library headers.
2021
* `Ndbm_LIBRARY` - The path to the package library.
2122
22-
Hints:
23+
## Hints
2324
24-
The `Ndbm_ROOT` variable adds custom search path.
25+
* The `Ndbm_ROOT` variable adds custom search path.
2526
#]=============================================================================]
2627

2728
include(CheckLibraryExists)
@@ -50,7 +51,15 @@ endif()
5051

5152
find_library(
5253
Ndbm_LIBRARY
53-
NAMES ndbm db1 gdbm_compat c
54+
NAMES
55+
ndbm
56+
gdbm_compat
57+
db1
58+
# TODO: Which system still has ndbm built in the default C library? In such
59+
# case this find module should be refactored to search the built-in library
60+
# similar to how FindIconv does it. Otherwise, more likely, this should be
61+
# removed from here.
62+
c
5463
DOC "The path to the ndbm library"
5564
)
5665

cmake/cmake/modules/FindQDBM.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ Module defines the following `IMPORTED` target(s):
55
66
* `QDBM::QDBM` - The package library, if found.
77
8-
Result variables:
8+
## Result variables
99
1010
* `QDBM_FOUND` - Whether the package has been found.
1111
* `QDBM_INCLUDE_DIRS` - Include directories needed to use this package.
1212
* `QDBM_LIBRARIES` - Libraries needed to link to the package library.
1313
* `QDBM_VERSION` - Package version, if found.
1414
15-
Cache variables:
15+
## Cache variables
1616
1717
* `QDBM_INCLUDE_DIR` - Directory containing package library headers.
1818
* `QDBM_LIBRARY` - The path to the package library.
1919
20-
Hints:
20+
## Hints
2121
22-
The `QDBM_ROOT` variable adds custom search path.
22+
* The `QDBM_ROOT` variable adds custom search path.
2323
#]=============================================================================]
2424

2525
include(CheckLibraryExists)

cmake/cmake/modules/FindTokyoCabinet.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ Module defines the following `IMPORTED` target(s):
55
66
* `TokyoCabinet::TokyoCabinet` - The package library, if found.
77
8-
Result variables:
8+
## Result variables
99
1010
* `TokyoCabinet_FOUND` - Whether the package has been found.
1111
* `TokyoCabinet_INCLUDE_DIRS` - Include directories needed to use this package.
1212
* `TokyoCabinet_LIBRARIES` - Libraries needed to link to the package library.
1313
* `TokyoCabinet_VERSION` - Package version, if found.
1414
15-
Cache variables:
15+
## Cache variables
1616
1717
* `TokyoCabinet_INCLUDE_DIR` - Directory containing package library headers.
1818
* `TokyoCabinet_LIBRARY` - The path to the package library.
1919
20-
Hints:
20+
## Hints
2121
22-
The `TokyoCabinet_ROOT` variable adds custom search path.
22+
* The `TokyoCabinet_ROOT` variable adds custom search path.
2323
#]=============================================================================]
2424

2525
include(CheckLibraryExists)

cmake/cmake/modules/PHP/FeatureSummary.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ block()
4343
list(REMOVE_DUPLICATES enabledFeatures)
4444
endif()
4545

46-
list(SORT enabledFeatures COMPARE NATURAL)
46+
list(SORT enabledFeatures COMPARE NATURAL CASE INSENSITIVE)
4747

4848
set(sapis "")
4949
set(extensions "")

0 commit comments

Comments
 (0)