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
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
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,
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
{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)
NULL,
PHP_RSHUTDOWN(pdo_dblib),
PHP_MINFO(pdo_dblib),
- "0.1-dev",
+ "0.9",
STANDARD_MODULE_PROPERTIES
};