- 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.
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