Skip to content

Commit 3e76102

Browse files
authored
Fix ext/odbc and ext/pdo_odbc (#6)
- Updated FindODBC module - Configuration options synced - User experience annoyances reduced a bit - Configuration headers synced for in-php-src or standalone extension builds - Improved ODBC driver selection - Fixed odbc extension build as these are still STATIC libraries for simplicity of usage but should probably be OBJECT otherwise PHP doesn't provide some symbols when linking. - Enabled overriding ODBC compile and link options - Fixed ODBC headers check. The ODBC headers check is a bit simplistic but it matches the upstream check. Many of these headers are not self-contained and can't be checked with only `check_include_file()` so this resorts to file checking. Additionally fixed in this context: - MySQL_CONFIG_EXECUTABLE marked as advanced to not show in regular list of options in GUI. - PHP/Set module adjusted to have choices validated by default. - Simplified `CHOICES` handling and automatic set of `VALUE` and `TYPE`. - When using `PkgConfig` `pkg_*` commands, the `PkgConfig` module can also not be loaded when `CMAKE_DISABLE_FIND_PACKAGE_PkgConfig` is set by the user. This syncs `FindODBC` and the rest of the `Find*` modules with `PKG_CONFIG_FOUND` guards. - Rest of the extensions synced with the new `php_set()` signature.
1 parent e5eb087 commit 3e76102

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+853
-366
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ jobs:
8080
libfreetype-dev \
8181
libldap2-dev \
8282
unixodbc-dev \
83-
libodbc2 \
8483
freetds-dev \
8584
libsnmp-dev \
8685
snmp \

cmake/cmake/modules/FindACL.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ else()
143143

144144
# Use pkgconf, if available on the system.
145145
find_package(PkgConfig QUIET)
146-
pkg_check_modules(PC_ACL QUIET libacl)
146+
if(PKG_CONFIG_FOUND)
147+
pkg_check_modules(PC_ACL QUIET libacl)
148+
endif()
147149

148150
find_path(
149151
ACL_INCLUDE_DIR

cmake/cmake/modules/FindApache.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ endif()
193193
# Find the apr library (Apache portable runtime).
194194
# Use pkgconf, if available on the system.
195195
find_package(PkgConfig QUIET)
196-
pkg_check_modules(PC_Apache_APR QUIET apr-1)
196+
if(PKG_CONFIG_FOUND)
197+
pkg_check_modules(PC_Apache_APR QUIET apr-1)
198+
endif()
197199

198200
find_path(
199201
Apache_APR_INCLUDE_DIR

cmake/cmake/modules/FindAppArmor.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ set(_reason "")
3737

3838
# Use pkgconf, if available on the system.
3939
find_package(PkgConfig QUIET)
40-
pkg_check_modules(PC_AppArmor QUIET libapparmor)
40+
if(PKG_CONFIG_FOUND)
41+
pkg_check_modules(PC_AppArmor QUIET libapparmor)
42+
endif()
4143

4244
find_path(
4345
AppArmor_INCLUDE_DIR

cmake/cmake/modules/FindArgon2.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ set(_reason "")
3636

3737
# Use pkgconf, if available on the system.
3838
find_package(PkgConfig QUIET)
39-
pkg_check_modules(PC_Argon2 QUIET libargon2)
39+
if(PKG_CONFIG_FOUND)
40+
pkg_check_modules(PC_Argon2 QUIET libargon2)
41+
endif()
4042

4143
find_path(
4244
Argon2_INCLUDE_DIR

cmake/cmake/modules/FindCapstone.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ set(_reason "")
3636

3737
# Use pkgconf, if available on the system.
3838
find_package(PkgConfig QUIET)
39-
pkg_check_modules(PC_Capstone QUIET capstone)
39+
if(PKG_CONFIG_FOUND)
40+
pkg_check_modules(PC_Capstone QUIET capstone)
41+
endif()
4042

4143
find_path(
4244
Capstone_INCLUDE_DIR

cmake/cmake/modules/FindCdb.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ set(_reason "")
3737

3838
# Use pkgconf, if available on the system.
3939
find_package(PkgConfig QUIET)
40-
pkg_check_modules(PC_Cdb QUIET libcdb)
40+
if(PKG_CONFIG_FOUND)
41+
pkg_check_modules(PC_Cdb QUIET libcdb)
42+
endif()
4143

4244
find_path(
4345
Cdb_INCLUDE_DIR

cmake/cmake/modules/FindCrypt.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ else()
8585

8686
# Use pkgconf, if available on the system.
8787
find_package(PkgConfig QUIET)
88-
pkg_search_module(PC_Crypt QUIET libcrypt libxcrypt)
88+
if(PKG_CONFIG_FOUND)
89+
pkg_search_module(PC_Crypt QUIET libcrypt libxcrypt)
90+
endif()
8991

9092
find_path(
9193
Crypt_INCLUDE_DIR

cmake/cmake/modules/FindEditline.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ set(_reason "")
3737

3838
# Use pkgconf, if available on the system.
3939
find_package(PkgConfig QUIET)
40-
pkg_check_modules(PC_Editline QUIET libedit)
40+
if(PKG_CONFIG_FOUND)
41+
pkg_check_modules(PC_Editline QUIET libedit)
42+
endif()
4143

4244
find_path(
4345
Editline_INCLUDE_DIR

cmake/cmake/modules/FindEnchant.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ endif()
4343

4444
# Use pkgconf, if available on the system.
4545
find_package(PkgConfig QUIET)
46-
pkg_check_modules(PC_Enchant QUIET ${_enchant_name})
46+
if(PKG_CONFIG_FOUND)
47+
pkg_check_modules(PC_Enchant QUIET ${_enchant_name})
48+
endif()
4749

4850
find_path(
4951
Enchant_INCLUDE_DIR

0 commit comments

Comments
 (0)