looking for include and lib dirs under "dir"
flavour can be one of:
- ibm-db2, unixODBC, ODBCRouter, generic
+ ibm-db2, unixODBC, generic
You may omit the ,dir part to use a reasonable default for
the flavour you have selected. e.g.:
fi
])
-AC_MSG_CHECKING(which ODBC flavour you want)
-if test "$PHP_PDO_ODBC" != "no" && test "$PHP_PDO_ODBC" != "yes" ; then
-
- AC_MSG_CHECKING([for PDO includes])
- if test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
- pdo_inc_path=$prefix/include/php/ext
- elif test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
- pdo_inc_path=$abs_srcdir/ext
- elif test -f ext/pdo/php_pdo_driver.h; then
- pdo_inc_path=ext
- else
- AC_MSG_ERROR([Cannot find php_pdo_driver.h.])
- fi
- AC_MSG_RESULT($pdo_inc_path)
+if test "$PHP_PDO_ODBC" != "no"; then
+ AC_MSG_CHECKING(which ODBC flavour you want)
pdo_odbc_flavour=`echo $withval | cut -d, -f1`
pdo_odbc_dir=`echo $withval | cut -d, -f2`
PHP_EVAL_LIBLINE($PDO_ODBC_LIBS $PDO_ODBC_LFLAGS, [PDO_ODBC_SHARED_LIBADD])
PHP_SUBST(PDO_ODBC_SHARED_LIBADD)
+ AC_MSG_CHECKING([for PDO includes])
+ if test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
+ pdo_inc_path=$prefix/include/php/ext
+ elif test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
+ pdo_inc_path=$abs_srcdir/ext
+ elif test -f ext/pdo/php_pdo_driver.h; then
+ pdo_inc_path=ext
+ else
+ AC_MSG_ERROR([Cannot find php_pdo_driver.h.])
+ fi
+ AC_MSG_RESULT($pdo_inc_path)
+
PHP_NEW_EXTENSION(pdo_odbc, pdo_odbc.c odbc_driver.c odbc_stmt.c, $ext_shared,,-I$pdo_inc_path $PDO_ODBC_INCLUDE)
PHP_ADD_EXTENSION_DEP(pdo_odbc, pdo)
-else
- AC_MSG_ERROR(
-Unknown ODBC flavour $PHP_PDO_ODBC
-PDO_ODBC_HELP_TEXT
-)
fi
return 1;
}
-static int odbc_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsigned long *len TSRMLS_DC)
+static int odbc_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsigned long *len, int *caller_frees TSRMLS_DC)
{
pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data;
pdo_odbc_column *C = &S->cols[colno];