diff --git a/ext/pdo_odbc/config.m4 b/ext/pdo_odbc/config.m4 index 5216b5eb90b..e69a8a6bc73 100755 --- a/ext/pdo_odbc/config.m4 +++ b/ext/pdo_odbc/config.m4 @@ -1,23 +1,31 @@ dnl $Id$ dnl config.m4 for extension pdo_odbc -PHP_ARG_WITH(pdo-odbc, PDBC driver for PDO, -[[ --with-pdo-odbc=flavour,dir Add support for "flavour" ODBC drivers, - looking for include and lib dirs under "dir" +AC_DEFUN(PDO_ODBC_HELP_TEXT, [[ + --with-pdo-odbc=flavour,dir Add support for "flavour" ODBC drivers, + looking for include and lib dirs under "dir" flavour can be one of: ibm-db2, unixODBC - The extension will always be created as a shared extension + You may omit the ,dir part to use a reasonable default for + the flavour you have selected. e.g.: + --with-pdo-odbc=unixODBC + will check for unixODBC under /usr/local + + This extension will always be created as a shared extension named pdo_odbc.so ]]) +PHP_ARG_WITH(pdo-odbc, ODBC v3 driver for PDO, PDO_ODBC_HELP_TEXT) + AC_DEFUN([PDO_ODBC_CHECK_HEADER],[ if test -f $PDO_ODBC_INCDIR/$1 ; then AC_DEFINE([HAVE_]translit($1,a-z_.-,A-Z___), 1, [ ]) fi ]) +AC_MSG_CHECKING(which ODBC flavour you want) if test "$PHP_PDO_ODBC" != "no" && test "$PHP_PDO_ODBC" != "yes" ; then pdo_odbc_flavour=`echo $withval | cut -d, -f1` pdo_odbc_dir=`echo $withval | cut -d, -f2` @@ -26,9 +34,6 @@ if test "$PHP_PDO_ODBC" != "no" && test "$PHP_PDO_ODBC" != "yes" ; then pdo_odbc_dir="" fi - - AC_MSG_CHECKING(which ODBC flavour you want) - case $pdo_odbc_flavour in ibm-db2) pdo_odbc_def_libdir=/home/db2inst/sqllib/lib @@ -43,7 +48,9 @@ if test "$PHP_PDO_ODBC" != "no" && test "$PHP_PDO_ODBC" != "yes" ; then ;; *) - AC_MSG_ERROR(Unknown ODBC flavour $pdo_odbc_flavour) + AC_MSG_ERROR(Unknown ODBC flavour $pdo_odbc_flavour +PDO_ODBC_HELP_TEXT +) ;; esac @@ -95,5 +102,10 @@ if test "$PHP_PDO_ODBC" != "no" && test "$PHP_PDO_ODBC" != "yes" ; then PHP_SUBST(PDO_ODBC_SHARED_LIBADD) PHP_NEW_EXTENSION(pdo_odbc, pdo_odbc.c odbc_driver.c odbc_stmt.c, yes,,-I\$prefix/include/php/ext $PDO_ODBC_INCLUDE) +else + AC_MSG_ERROR( +Unknown ODBC flavour $PHP_PDO_ODBC +PDO_ODBC_HELP_TEXT +) fi diff --git a/ext/pdo_odbc/package.xml b/ext/pdo_odbc/package.xml index 0b552d897aa..57e9d990aa9 100755 --- a/ext/pdo_odbc/package.xml +++ b/ext/pdo_odbc/package.xml @@ -1,7 +1,7 @@ - pdo_odbc + PDO_ODBC ODBC v3 Interface driver for PDO @@ -11,18 +11,25 @@ lead + + + This extension provides an ODBC v3 driver for PDO. It supports unixODBC - and IBM DB2 libraries, and will most likely support many more. + and IBM DB2 libraries, and will support more in future releases. PHP alpha - 0.1dev - 2004-05-18 + 0.1 + 2004-05-21 - Still much to be done. + You need to install the PDO core module before you can make use of this one. + You also require either IBM DB2 CLI libraries or unixODBC. + + If you are running on windows, you can download the binary from here: + http://snaps.php.net/win32/PECL_5_0/php_pdo_odbc.dll @@ -37,8 +44,8 @@ - - + + diff --git a/ext/pdo_odbc/pdo_odbc.c b/ext/pdo_odbc/pdo_odbc.c index d09f18995b0..4564ac67e02 100755 --- a/ext/pdo_odbc/pdo_odbc.c +++ b/ext/pdo_odbc/pdo_odbc.c @@ -48,7 +48,7 @@ function_entry pdo_odbc_functions[] = { /* {{{ pdo_odbc_module_entry */ zend_module_entry pdo_odbc_module_entry = { STANDARD_MODULE_HEADER, - "pdo_odbc", + "PDO_ODBC", pdo_odbc_functions, PHP_MINIT(pdo_odbc), PHP_MSHUTDOWN(pdo_odbc),