com php-src: Use PKG_CHECK_MODULES to detect unixODBC : UPGRADING ext/odbc/config.m4
| From: | Nikita Popov | Date: | Wed, 22 May 2019 07:04:05 +0000 |
| Subject: | com php-src: Use PKG_CHECK_MODULES to detect unixODBC : UPGRADING ext/odbc/config.m4 | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106281@lists.php.net to get a copy of this message | ||
Commit: 9df3e097b88533dd9abae4360500c849054dc410
Author: Hugh McMaster <hugh.mcmaster@outlook.com> Mon, 20 May 2019 22:48:14 +1000
Committer: Nikita Popov <nikita.ppv@gmail.com> Wed, 22 May 2019 09:04:05 +0200
Parents: 12c1d7419a562989fb4d56ac95489fd9abab4b9b
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9df3e097b88533dd9abae4360500c849054dc410
Log:
Use PKG_CHECK_MODULES to detect unixODBC
Changed paths:
M UPGRADING
M ext/odbc/config.m4
Diff:
diff --git a/UPGRADING b/UPGRADING
index 1de5b39..91f26e9 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -536,6 +536,7 @@ The following extensions and SAPIs are affected:
- ODBC:
. --with-iodbc no longer accepts a directory.
+ . --with-unixODBC no longer accepts a directory.
- OpenSSL:
. --with-openssl no longer accepts a directory.
diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4
index 792aaef..1fdce14 100644
--- a/ext/odbc/config.m4
+++ b/ext/odbc/config.m4
@@ -357,23 +357,16 @@ fi
if test -z "$ODBC_TYPE"; then
PHP_ARG_WITH([unixODBC],,
- [AS_HELP_STRING([[--with-unixODBC[=DIR]]],
- [Include unixODBC support [/usr/local]])])
+ [AS_HELP_STRING([--with-unixODBC],
+ [Include unixODBC support])])
- AC_MSG_CHECKING(for unixODBC support)
+ AC_MSG_CHECKING(whether to build with unixODBC support)
if test "$PHP_UNIXODBC" != "no"; then
- if test "$PHP_UNIXODBC" = "yes"; then
- PHP_UNIXODBC=/usr/local
- fi
- ODBC_INCDIR=$PHP_UNIXODBC/include
- ODBC_LIBDIR=$PHP_UNIXODBC/$PHP_LIBDIR
- ODBC_LFLAGS=-L$ODBC_LIBDIR
- ODBC_CFLAGS=-I$ODBC_INCDIR
- ODBC_LIBS=-lodbc
+ AC_MSG_RESULT(yes)
+ PKG_CHECK_MODULES([ODBC], [odbc])
+ PHP_EVAL_INCLINE($ODBC_CFLAGS)
ODBC_TYPE=unixODBC
- PHP_ODBC_CHECK_HEADER(sqlext.h)
AC_DEFINE(HAVE_UNIXODBC,1,[ ])
- AC_MSG_RESULT([$ext_output])
else
AC_MSG_RESULT(no)
fi