summaryrefslogtreecommitdiff
path: root/ext/odbc
diff options
context:
space:
mode:
authorHugh McMaster <hugh.mcmaster@outlook.com>2019-05-20 22:48:14 +1000
committerNikita Popov <nikita.ppv@gmail.com>2019-05-22 09:04:05 +0200
commit9df3e097b88533dd9abae4360500c849054dc410 (patch)
tree549f179d29074f657fb053040a9077887756f715 /ext/odbc
parent12c1d7419a562989fb4d56ac95489fd9abab4b9b (diff)
downloadphp-git-9df3e097b88533dd9abae4360500c849054dc410.tar.gz
Use PKG_CHECK_MODULES to detect unixODBC
Diffstat (limited to 'ext/odbc')
-rw-r--r--ext/odbc/config.m419
1 files changed, 6 insertions, 13 deletions
diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4
index 792aaef5bb..1fdce146cd 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