]> granicus.if.org Git - php/commitdiff
Added support for SAP DB
authorAndreas Karajannis <kara@php.net>
Tue, 17 Oct 2000 15:23:18 +0000 (15:23 +0000)
committerAndreas Karajannis <kara@php.net>
Tue, 17 Oct 2000 15:23:18 +0000 (15:23 +0000)
ext/odbc/config.m4
ext/odbc/php_odbc.h
ext/odbc/setup.stub

index 04fc1807ba55a5ab241a8a29cd5f08610ba5f9c4..aaba400e8997dc907d76fc70402e745400c00970 100644 (file)
@@ -106,6 +106,32 @@ AC_ARG_WITH(adabas,
 ])
 fi
 
+if test -z "$ODBC_TYPE"; then
+AC_MSG_CHECKING(for SAP DB support)
+AC_ARG_WITH(sapdb,
+[  --with-sapdb[=DIR]      Include SAP DB support.  DIR is SAP DB base
+                          install directory, defaults to /usr/local.],
+[
+  if test "$withval" = "yes"; then
+    withval=/usr/local
+  fi
+  if test "$withval" != "no"; then
+    AC_ADD_INCLUDE($withval/incl)
+       AC_ADD_LIBPATH($withval/lib)
+       AC_ADD_LIBRARY(sqlod)
+       AC_ADD_LIBRARY(sqlrte)
+    ODBC_TYPE=sapdb
+    AC_DEFINE(HAVE_SAPDB,1,[ ])
+    AC_MSG_RESULT(yes)
+  else
+    AC_MSG_RESULT(no)
+  fi
+],[
+  AC_MSG_RESULT(no)
+])
+fi
+
+
 if test -z "$ODBC_TYPE"; then
 AC_MSG_CHECKING(for Solid support)
 AC_ARG_WITH(solid,
index f67e9a12e7947bfef2e31b3175977e3663bed357..3b903f834b89a7c8f72b703dcb219e3739fcbc02 100644 (file)
@@ -75,6 +75,15 @@ PHP_FUNCTION(solid_fetch_prev);
 #define HAVE_SQL_EXTENDED_FETCH 1
 #define SQL_SUCCEEDED(rc) (((rc)&(~1))==0)
 
+#elif defined(HAVE_SAPDB) /* SAP DB */
+
+#define ODBC_TYPE "SAP DB"
+#include <WINDOWS.H>
+#include <sql.h>
+#include <sqlext.h>
+#define HAVE_SQL_EXTENDED_FETCH 1
+#define SQL_SUCCEEDED(rc) (((rc)&(~1))==0)
+
 #elif defined(HAVE_IODBC) /* iODBC library */
 
 #define ODBC_TYPE "iODBC"
@@ -219,7 +228,7 @@ typedef struct odbc_connection {
 #if defined( HAVE_IBMDB2 ) || defined( HAVE_UNIXODBC )
        SQLHANDLE henv;
        SQLHANDLE hdbc;
-#elif defined( HAVE_SOLID_35 )
+#elif defined( HAVE_SOLID_35 ) || defined( HAVE_SAPDB )
        SQLHENV henv;
        SQLHDBC hdbc;
 #else
@@ -240,7 +249,7 @@ typedef struct odbc_result_value {
 typedef struct odbc_result {
 #if defined( HAVE_IBMDB2 ) || defined( HAVE_UNIXODBC )
        SQLHANDLE stmt;
-#elif defined( HAVE_SOLID_35 )
+#elif defined( HAVE_SOLID_35 ) || defined( HAVE_SAPDB )
        SQLHSTMT stmt;
 #else
        HSTMT stmt;
@@ -285,7 +294,7 @@ int odbc_bindcols(odbc_result *result);
 
 #if defined( HAVE_IBMDB2 ) || defined( HAVE_UNIXODBC )
 #define ODBC_SQL_ERROR_PARAMS SQLHANDLE henv, SQLHANDLE conn, SQLHANDLE stmt, char *func
-#elif defined( HAVE_SOLID_35 )
+#elif defined( HAVE_SOLID_35 ) || defined( HAVE_SAPDB )
 #define ODBC_SQL_ERROR_PARAMS SQLHENV henv, SQLHDBC conn, SQLHSTMT stmt, char *func
 #else
 #define ODBC_SQL_ERROR_PARAMS HENV henv, HDBC conn, HSTMT stmt, char *func
index f257bc5ec9b1217df5036635d4cf222ca4348b48..859750c9ea1e2e07d0c35c617c181e9c53b87093 100644 (file)
@@ -30,7 +30,8 @@ fi
 
 # unixODBC
 if test "$option_value_with_solid" = "no" -a \
-        "$option_value_with_empress" = "no"; then
+        "$option_value_with_empress" = "no" -a \
+        "$option_value_with_iodbc" = "no"; then
 define_option with-unixODBC 'unixODBC support?' yesnodir \
     'no /usr/local unixODBC install' \
 '    Whether to build PHP with unixODBC support.  This feature was first\n
@@ -43,7 +44,9 @@ fi
 
 # ESOOB
 if test "$option_value_with_solid" = "no" -a \
-        "$option_value_with_empress" = "no"; then
+        "$option_value_with_empress" = "no" -a \
+        "$option_value_with_iodbc" = "no" -a \
+        "$option_value_with_unixODBC" = "no"; then
 define_option with-esoob 'Easysoft ODBC-ODBC Bridge support?' yesnodir \
     'no /usr/local/easysoft/oob/client ESOOB install' \
 '    Whether to build PHP with Easysoft ODBC-ODBC Bridge support.\n
@@ -54,7 +57,9 @@ fi
 # OpenLink
 if test "$option_value_with_solid" = "no" -a \
         "$option_value_with_empress" = "no" -a \
-        "$option_value_with_iodbc" = "no"; then
+        "$option_value_with_iodbc"" = "no" -a \
+        "$option_value_with_unixODBC" = "no" -a \
+        "$option_value_with_esoob" = "no"; then
 define_option with-openlink 'OpenLink ODBC support?' yesnodir \
     'no /usr/local/openlink OpenLink install' \
 '    Whether to build PHP with OpenLink ODBC support.  See
@@ -65,6 +70,8 @@ fi
 if test "$option_value_with_solid" = "no" -a \
         "$option_value_with_empress" = "no" -a \
         "$option_value_with_iodbc" = "no" -a \
+        "$option_value_with_unixODBC" = "no" -a \ 
+        "$option_value_with_esoob" = "no" -a \
         "$option_value_with_openlink" = "no"; then
 define_option with-adabas 'Adabas D support?' yesnodir \
     'no /usr/local Adabas D install root' \
@@ -76,6 +83,8 @@ fi
 if test "$option_value_with_solid" = "no" -a \
         "$option_value_with_empress" = "no" -a \
         "$option_value_with_iodbc" = "no" -a \
+        "$option_value_with_unixODBC" = "no" -a \ 
+        "$option_value_with_esoob" = "no" -a \
         "$option_value_with_openlink" = "no" -a \
         "$option_value_with_adabas" = "no"; then
 define_option with-velocis 'Velocis support?' yesnodir \
@@ -88,6 +97,8 @@ fi
 if test "$option_value_with_solid" = "no" -a \
         "$option_value_with_empress" = "no" -a \
         "$option_value_with_iodbc" = "no" -a \
+        "$option_value_with_unixODBC" = "no" -a \
+        "$option_value_with_esoob" = "no" -a \
         "$option_value_with_openlink" = "no" -a \
         "$option_value_with_adabas" = "no" -a \
         "$option_value_with_velocis" = "no"; then
@@ -97,17 +108,37 @@ define_option with-dbmaker 'DBMaker support?' yesnodir \
      More information about DBMaker can be found at http://www.casemaker.com/.'
 fi
 
-# Custom ODBC
+# SAP DB
 if test "$option_value_with_solid" = "no" -a \
         "$option_value_with_empress" = "no" -a \
         "$option_value_with_iodbc" = "no" -a \
+        "$option_value_with_unixODBC" = "no" -a \
+        "$option_value_with_esoob" = "no" -a \
         "$option_value_with_openlink" = "no" -a \
         "$option_value_with_adabas" = "no" -a \
-        "$option_value_with_velocis" = "no"; -a \
+        "$option_value_with_velocis" = "no" -a \
         "$option_value_with_dbmaker" = "no"; then
+define_option with-sapdb 'SAP DB support?' yesnodir \
+    'no /usr/local SAP DB install' \
+'    Whether to build PHP with SAP DB support. \n
+     More information about SAP DB can be found at http://www.sapdb.org.'
+fi
+
+# Custom ODBC
+if test "$option_value_with_solid" = "no" -a \
+        "$option_value_with_empress" = "no" -a \
+        "$option_value_with_iodbc" = "no" -a \
+        "$option_value_with_unixODBC" = "no" -a \
+        "$option_value_with_esoob" = "no" -a \
+        "$option_value_with_openlink" = "no" -a \
+        "$option_value_with_adabas" = "no" -a \
+        "$option_value_with_velocis" = "no" -a \
+        "$option_value_with_dbmaker" = "no" -a \
+        "$option_value_with_sapdb" = "no"; then
 define_option with-custom-odbc 'custom ODBC support?' yesnodir \
     'no /usr/local CODBC install' \
 '    Whether to build PHP with CODBC support.  This feature was first
     developed for Sybase SQL Anywhere 5.5 on QNX, but may be used for
     any unknown ODBC driver on all flavors of UNIX.'
 fi
+