com php-src: keep DIR option to --with-unixODBC for old versions without libodbc.pc: UPGRADING ext/odbc/config.m4

From: Date: Wed, 05 Jun 2019 08:56:10 +0000
Subject: com php-src: keep DIR option to --with-unixODBC for old versions without libodbc.pc: UPGRADING ext/odbc/config.m4
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-106563@lists.php.net to get a copy of this message
Commit: 8f854c109927019192721a890ed7f201db1e2f87 Author: Remi Collet <remi@php.net> Wed, 5 Jun 2019 10:56:05 +0200 Parents: ac9ce0f895c285a01052eae6accc37ece25090fa Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8f854c109927019192721a890ed7f201db1e2f87 Log: keep DIR option to --with-unixODBC for old versions without libodbc.pc Changed paths: M UPGRADING M ext/odbc/config.m4 Diff: diff --git a/UPGRADING b/UPGRADING index 1335d2c..2d63688 100644 --- a/UPGRADING +++ b/UPGRADING @@ -563,7 +563,8 @@ The following extensions and SAPIs are affected: - ODBC: . --with-iodbc no longer accepts a directory. - . --with-unixODBC no longer accepts a directory. + . --with-unixODBC without directory now use pkg-config (preferred). + Directory is still accepted for old versions without libodbc.pc. - OpenSSL: . --with-openssl no longer accepts a directory. diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4 index 1fdce14..ab0c55c 100644 --- a/ext/odbc/config.m4 +++ b/ext/odbc/config.m4 @@ -362,9 +362,20 @@ PHP_ARG_WITH([unixODBC],, AC_MSG_CHECKING(whether to build with unixODBC support) if test "$PHP_UNIXODBC" != "no"; then - AC_MSG_RESULT(yes) - PKG_CHECK_MODULES([ODBC], [odbc]) - PHP_EVAL_INCLINE($ODBC_CFLAGS) + if test "$PHP_UNIXODBC" = "yes"; then + AC_MSG_RESULT(yes from pkgconfig) + PKG_CHECK_MODULES([ODBC], [odbc]) + PHP_EVAL_INCLINE($ODBC_CFLAGS) + else + dnl keep old DIR way for old version without libodbc.pc + ODBC_INCDIR=$PHP_UNIXODBC/include + ODBC_LIBDIR=$PHP_UNIXODBC/$PHP_LIBDIR + ODBC_LFLAGS=-L$ODBC_LIBDIR + ODBC_CFLAGS=-I$ODBC_INCDIR + ODBC_LIBS=-lodbc + PHP_ODBC_CHECK_HEADER(sqlext.h) + AC_MSG_RESULT(yes in $PHP_UNIXODBC) + fi ODBC_TYPE=unixODBC AC_DEFINE(HAVE_UNIXODBC,1,[ ]) else

« previous php.cvs (#106563) next »