diff options
author | Wez Furlong <wez@php.net> | 2005-07-27 03:12:43 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2005-07-27 03:12:43 +0000 |
commit | f7c0b7d09ef05f3d29c57b2234b5f7f483b15200 (patch) | |
tree | 8815d3774457c1372d113214495d22e5c1c9c30c /ext | |
parent | ba77f8515bed08698cec1069c661f2c0e47d2aeb (diff) | |
download | php-git-f7c0b7d09ef05f3d29c57b2234b5f7f483b15200.tar.gz |
prep for PECL release
Diffstat (limited to 'ext')
-rw-r--r-- | ext/pdo_dblib/README | 4 | ||||
-rw-r--r-- | ext/pdo_dblib/config.m4 | 27 | ||||
-rw-r--r-- | ext/pdo_dblib/pdo_dblib.c | 14 |
3 files changed, 39 insertions, 6 deletions
diff --git a/ext/pdo_dblib/README b/ext/pdo_dblib/README index a32eefcf17..888ffb676f 100644 --- a/ext/pdo_dblib/README +++ b/ext/pdo_dblib/README @@ -9,10 +9,6 @@ This extension will compile and register itself as 'mssql' when built against the mssql libraries (and be named php_pdo_mssql.dll), or 'sybase' otherwise (php_pdo_sybase.dll) -This extension should also compile and run under unix platforms, but I haven't -written the config.m4 for that yet (volunteers welcome). - - If you want to try out the free "desktop" version of SQL Server, known as the MSDE, google to obtain the appropriate download link. Here are some short tips on getting it running: - Download it and run it to extract it diff --git a/ext/pdo_dblib/config.m4 b/ext/pdo_dblib/config.m4 index ee6f537010..55205bba21 100644 --- a/ext/pdo_dblib/config.m4 +++ b/ext/pdo_dblib/config.m4 @@ -33,6 +33,10 @@ if test "$PHP_PDO_DBLIB" != "no"; then fi fi + if test "x$PHP_LIBDIR" = "x" ; then + PHP_LIBDIR=lib + fi + if test ! -r "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.a" && test ! -r "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.so"; then AC_MSG_ERROR(Could not find $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.[a|so]) fi @@ -42,7 +46,23 @@ if test "$PHP_PDO_DBLIB" != "no"; then PHP_ADD_INCLUDE($PDO_DBLIB_INCDIR) PHP_ADD_LIBRARY_WITH_PATH(sybdb, $PDO_DBLIB_LIBDIR, PDO_DBLIB_SHARED_LIBADD) - PHP_CHECK_PDO_INCLUDES + ifdef([PHP_CHECK_PDO_INCLUDES], + [ + PHP_CHECK_PDO_INCLUDES + ],[ + AC_MSG_CHECKING([for PDO includes]) + if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$abs_srcdir/ext + elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then + pdo_inc_path=$prefix/include/php/ext + else + AC_MSG_ERROR([Cannot find php_pdo_driver.h.]) + fi + AC_MSG_RESULT($pdo_inc_path) + ]) + PDO_DBLIB_DEFS="-DPDO_DBLIB_FLAVOUR=\\\"freetds\\\"" PHP_NEW_EXTENSION(pdo_dblib, pdo_dblib.c dblib_driver.c dblib_stmt.c, $ext_shared,,-I$pdo_inc_path $PDO_DBLIB_DEFS) AC_CHECK_LIB(dnet_stub, dnet_addr, @@ -52,6 +72,11 @@ if test "$PHP_PDO_DBLIB" != "no"; then AC_DEFINE(HAVE_PDO_DBLIB,1,[ ]) AC_DEFINE(HAVE_FREETDS,1,[ ]) PHP_SUBST(PDO_DBLIB_SHARED_LIBADD) + + ifdef([PHP_ADD_EXTENDION_DEP], + [ + PHP_ADD_EXTENSION_DEP(pdo_dblib, pdo) + ]) fi fi diff --git a/ext/pdo_dblib/pdo_dblib.c b/ext/pdo_dblib/pdo_dblib.c index 87ae0bdb48..be11d9ff4a 100644 --- a/ext/pdo_dblib/pdo_dblib.c +++ b/ext/pdo_dblib/pdo_dblib.c @@ -38,8 +38,20 @@ function_entry pdo_dblib_functions[] = { {NULL, NULL, NULL} }; +#if ZEND_EXTENSION_API_NO >= 220050617 +static zend_module_dep pdo_dblib_deps[] = { + ZEND_MOD_REQUIRED("pdo") + {NULL, NULL, NULL} +}; +#endif + zend_module_entry pdo_dblib_module_entry = { +#if ZEND_EXTENSION_API_NO >= 220050617 + STANDARD_MODULE_HEADER_EX, NULL, + pdo_dblib_deps, +#else STANDARD_MODULE_HEADER, +#endif #if PDO_DBLIB_IS_MSSQL "pdo_mssql", #elif defined(PHP_WIN32) @@ -53,7 +65,7 @@ zend_module_entry pdo_dblib_module_entry = { NULL, PHP_RSHUTDOWN(pdo_dblib), PHP_MINFO(pdo_dblib), - "0.1-dev", + "0.9", STANDARD_MODULE_PROPERTIES }; |