diff options
author | Remi Collet <remi@remirepo.net> | 2024-08-14 15:48:41 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2024-08-14 15:48:41 +0200 |
commit | 06439860ec2c927b59a2a857fe119e33f76d9912 (patch) | |
tree | 282c2b3a836b3248097174cb8af0f65e9683c335 /php-8.2.0-iodbc.patch | |
parent | da350564906466bd5dffd5a56640d6dd6998432d (diff) |
allow to build using libiodbc instead of unixODBC (--with idobc)
Diffstat (limited to 'php-8.2.0-iodbc.patch')
-rw-r--r-- | php-8.2.0-iodbc.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/php-8.2.0-iodbc.patch b/php-8.2.0-iodbc.patch new file mode 100644 index 0000000..ba480aa --- /dev/null +++ b/php-8.2.0-iodbc.patch @@ -0,0 +1,41 @@ +From fbdf54c9efefaaa78277bbd951532cd9b6f0a16e Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Wed, 14 Aug 2024 14:32:47 +0200 +Subject: [PATCH] fix libodbc detection for headers in sub directory + +--- + ext/pdo_odbc/config.m4 | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/ext/pdo_odbc/config.m4 b/ext/pdo_odbc/config.m4 +index 72b604199bf72..b4478254ee0cb 100644 +--- a/ext/pdo_odbc/config.m4 ++++ b/ext/pdo_odbc/config.m4 +@@ -40,6 +40,7 @@ if test "$PHP_PDO_ODBC" != "no"; then + pdo_odbc_dir= + fi + ++ dnl TODO use PKG_CHECK_MODULES when possible + case $pdo_odbc_flavour in + ibm-db2) + pdo_odbc_def_libdir=/home/db2inst1/sqllib/lib +@@ -51,6 +52,7 @@ if test "$PHP_PDO_ODBC" != "no"; then + pdo_odbc_def_libdir=/usr/local/$PHP_LIBDIR + pdo_odbc_def_incdir=/usr/local/include + pdo_odbc_def_lib=iodbc ++ pdo_odbc_subdir=libiodbc + ;; + + unixODBC|unixodbc) +@@ -85,6 +87,11 @@ if test "$PHP_PDO_ODBC" != "no"; then + PDO_ODBC_LIBDIR="$pdo_odbc_def_libdir" + fi + ++ dnl handle installation in /usr/include/libiodbc ++ if test -n "$pdo_odbc_subdir" -a -d $PDO_ODBC_INCDIR/$pdo_odbc_subdir ; then ++ PDO_ODBC_INCDIR=$PDO_ODBC_INCDIR/$pdo_odbc_subdir ++ fi ++ + AC_MSG_RESULT([$pdo_odbc_flavour + libs $PDO_ODBC_LIBDIR, + headers $PDO_ODBC_INCDIR]) |