mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Cater to raised requirement of fbclient 3.0+ for pdo_firebird (GH-15498)
We * Document the fbclient 3.0+ version requirement * Windows: check existence of Interface.h Since we now require fbclient (3.0), we can drop support for the Interbase gds32_ms.lib right away. * POSIX: check for minimum required libfbclient version with fb_config * POSIX: check for `fb_get_master_interface()` The existence of `isc_detach_database` is implied by this. * POSIX: remove detection of unsupported or even wrong libraries libgds is for old Interbase which is incompatible with pdo_firebird for may years, and libib_util is a utitity library, not a replacement for libfbclient. Co-authored-by: Peter Kokot <peterkokot@gmail.com>
This commit is contained in:
parent
57f02e2aba
commit
96840072fc
3 changed files with 14 additions and 16 deletions
|
@ -148,7 +148,8 @@ PHP 8.4 UPGRADE NOTES
|
||||||
|
|
||||||
- PDO_FIREBIRD:
|
- PDO_FIREBIRD:
|
||||||
. Since some Firebird C++ APIs are used now, this extension requires a C++
|
. Since some Firebird C++ APIs are used now, this extension requires a C++
|
||||||
compiler to be built.
|
compiler to be built. This also implies that the extension has to be built
|
||||||
|
against fbclient 3.0 or higher.
|
||||||
. getAttribute, ATTR_AUTOCOMMIT has been changed to get the value as a bool.
|
. getAttribute, ATTR_AUTOCOMMIT has been changed to get the value as a bool.
|
||||||
|
|
||||||
- PDO_MYSQL:
|
- PDO_MYSQL:
|
||||||
|
|
|
@ -13,6 +13,8 @@ if test "$PHP_PDO_FIREBIRD" != "no"; then
|
||||||
FB_LIBDIR=$($FB_CONFIG --libs)
|
FB_LIBDIR=$($FB_CONFIG --libs)
|
||||||
FB_VERSION=$($FB_CONFIG --version)
|
FB_VERSION=$($FB_CONFIG --version)
|
||||||
AC_MSG_RESULT([version $FB_VERSION])
|
AC_MSG_RESULT([version $FB_VERSION])
|
||||||
|
AS_VERSION_COMPARE([$FB_VERSION], [3.0],
|
||||||
|
[AC_MSG_ERROR([Firebird required version is at least 3.0])])
|
||||||
PHP_EVAL_LIBLINE([$FB_LIBDIR], [PDO_FIREBIRD_SHARED_LIBADD])
|
PHP_EVAL_LIBLINE([$FB_LIBDIR], [PDO_FIREBIRD_SHARED_LIBADD])
|
||||||
PHP_EVAL_INCLINE([$FB_CFLAGS])
|
PHP_EVAL_INCLINE([$FB_CFLAGS])
|
||||||
else
|
else
|
||||||
|
@ -26,17 +28,11 @@ if test "$PHP_PDO_FIREBIRD" != "no"; then
|
||||||
FIREBIRD_LIBDIR_FLAG=-L$FIREBIRD_LIBDIR
|
FIREBIRD_LIBDIR_FLAG=-L$FIREBIRD_LIBDIR
|
||||||
])
|
])
|
||||||
|
|
||||||
PHP_CHECK_LIBRARY([fbclient], [isc_detach_database],
|
PHP_CHECK_LIBRARY([fbclient], [fb_get_master_interface],
|
||||||
[FIREBIRD_LIBNAME=fbclient],
|
[],
|
||||||
[PHP_CHECK_LIBRARY([gds], [isc_detach_database],
|
[AC_MSG_FAILURE([libfbclient not found.])],
|
||||||
[FIREBIRD_LIBNAME=gds],
|
|
||||||
[PHP_CHECK_LIBRARY([ib_util], [isc_detach_database],
|
|
||||||
[FIREBIRD_LIBNAME=ib_util],
|
|
||||||
[AC_MSG_FAILURE([libfbclient, libgds or libib_util not found.])],
|
|
||||||
[$FIREBIRD_LIBDIR_FLAG])],
|
|
||||||
[$FIREBIRD_LIBDIR_FLAG])],
|
|
||||||
[$FIREBIRD_LIBDIR_FLAG])
|
[$FIREBIRD_LIBDIR_FLAG])
|
||||||
PHP_ADD_LIBRARY_WITH_PATH([$FIREBIRD_LIBNAME],
|
PHP_ADD_LIBRARY_WITH_PATH([fbclient],
|
||||||
[$FIREBIRD_LIBDIR],
|
[$FIREBIRD_LIBDIR],
|
||||||
[PDO_FIREBIRD_SHARED_LIBADD])
|
[PDO_FIREBIRD_SHARED_LIBADD])
|
||||||
PHP_ADD_INCLUDE([$FIREBIRD_INCDIR])
|
PHP_ADD_INCLUDE([$FIREBIRD_INCDIR])
|
||||||
|
|
|
@ -4,11 +4,12 @@ ARG_WITH("pdo-firebird", "Firebird support for PDO", "no");
|
||||||
|
|
||||||
if (PHP_PDO_FIREBIRD != "no") {
|
if (PHP_PDO_FIREBIRD != "no") {
|
||||||
|
|
||||||
if ((CHECK_LIB("fbclient_ms.lib", "pdo_firebird", PHP_PHP_BUILD + "\\interbase\\lib_ms;" + PHP_PDO_FIREBIRD)
|
if (CHECK_LIB("fbclient_ms.lib", "pdo_firebird", PHP_PHP_BUILD + "\\interbase\\lib_ms;" + PHP_PDO_FIREBIRD)
|
||||||
|| CHECK_LIB("gds32_ms.lib", "pdo_firebird", PHP_PHP_BUILD + "\\interbase\\lib_ms;" + PHP_PDO_FIREBIRD)
|
&& CHECK_HEADER_ADD_INCLUDE("ibase.h", "CFLAGS_PDO_FIREBIRD",
|
||||||
) && CHECK_HEADER_ADD_INCLUDE("ibase.h", "CFLAGS_PDO_FIREBIRD",
|
PHP_PHP_BUILD + "\\include\\interbase;" + PHP_PHP_BUILD + "\\interbase\\include;" + PHP_PDO_FIREBIRD)
|
||||||
PHP_PHP_BUILD + "\\include\\interbase;" + PHP_PHP_BUILD + "\\interbase\\include;" + PHP_PDO_FIREBIRD)
|
&& CHECK_HEADER_ADD_INCLUDE("firebird\\Interface.h", "CFLAGS_PDO_FIREBIRD",
|
||||||
) {
|
PHP_PHP_BUILD + "\\include\\interbase;" + PHP_PHP_BUILD + "\\interbase\\include;" + PHP_PDO_FIREBIRD)
|
||||||
|
) {
|
||||||
|
|
||||||
EXTENSION("pdo_firebird", "pdo_firebird.c firebird_driver.c firebird_statement.c pdo_firebird_utils.cpp");
|
EXTENSION("pdo_firebird", "pdo_firebird.c firebird_driver.c firebird_statement.c pdo_firebird_utils.cpp");
|
||||||
ADD_FLAG("CFLAGS_PDO_FIREBIRD", "/EHsc");
|
ADD_FLAG("CFLAGS_PDO_FIREBIRD", "/EHsc");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue