Browse Source

prep for PECL release

PHP-5.1
Wez Furlong 21 years ago
parent
commit
f7c0b7d09e
  1. 4
      ext/pdo_dblib/README
  2. 27
      ext/pdo_dblib/config.m4
  3. 14
      ext/pdo_dblib/pdo_dblib.c

4
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

27
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

14
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
};

Loading…
Cancel
Save