diff options
author | Remi Collet <remi@remirepo.net> | 2024-08-14 15:56:31 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2024-08-14 15:56:31 +0200 |
commit | 164f80c423605d3e00f1581b05616964e3bec45d (patch) | |
tree | 810e1a5c34dc4b509e8be10211b78ef924d0df53 /php-8.2.0-iodbc.patch | |
parent | 9aa53caa7d5e5f9e6f1ec9643f4c131d2f997f75 (diff) |
allow to build using libiodbc instead of unixODBC (--with iodbc)
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]) |