]> granicus.if.org Git - php/commitdiff
prep for PECL release
authorWez Furlong <wez@php.net>
Wed, 27 Jul 2005 03:12:43 +0000 (03:12 +0000)
committerWez Furlong <wez@php.net>
Wed, 27 Jul 2005 03:12:43 +0000 (03:12 +0000)
ext/pdo_dblib/README
ext/pdo_dblib/config.m4
ext/pdo_dblib/pdo_dblib.c

index a32eefcf17c814264890398d9611fcfeb2a76143..888ffb676f15df53f759395aeb740e58c55a42cb 100644 (file)
@@ -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
index ee6f5370105126ab2b3c95f64161e742d10c68c8..55205bba217e5661bc008120e74ae9be46d639de 100644 (file)
@@ -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
index 87ae0bdb4899a5c7668df78c2e0bdc5df309005d..be11d9ff4a9a8016d9e1d57321e96a581a115567 100644 (file)
@@ -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
 };