cvs: php4 /ext/odbc config.m4 php_odbc.h setup.stub
| From: | Andreas Karajannis | Date: | Tue, 17 Oct 2000 15:23:18 +0000 |
| Subject: | cvs: php4 /ext/odbc config.m4 php_odbc.h setup.stub | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-2089@lists.php.net to get a copy of this message | ||
kara Tue Oct 17 08:23:18 2000 EDT
Modified files:
/php4/ext/odbc config.m4 php_odbc.h setup.stub
Log:
Added support for SAP DB
Index: php4/ext/odbc/config.m4
diff -u php4/ext/odbc/config.m4:1.27 php4/ext/odbc/config.m4:1.28
--- php4/ext/odbc/config.m4:1.27 Thu Sep 28 16:46:15 2000
+++ php4/ext/odbc/config.m4 Tue Oct 17 08:23:17 2000
@@ -107,6 +107,32 @@
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,
[ --with-solid[=DIR] Include Solid support. DIR is the Solid base
Index: php4/ext/odbc/php_odbc.h
diff -u php4/ext/odbc/php_odbc.h:1.27 php4/ext/odbc/php_odbc.h:1.28
--- php4/ext/odbc/php_odbc.h:1.27 Fri Sep 29 12:03:23 2000
+++ php4/ext/odbc/php_odbc.h Tue Oct 17 08:23:18 2000
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_odbc.h,v 1.27 2000/09/29 19:03:23 kalowsky Exp $ */
+/* $Id: php_odbc.h,v 1.28 2000/10/17 15:23:18 kara Exp $ */
#ifndef PHP_ODBC_H
#define PHP_ODBC_H
@@ -75,6 +75,15 @@
#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 @@
#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 {
#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 @@
#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: php4/ext/odbc/setup.stub
diff -u php4/ext/odbc/setup.stub:1.4 php4/ext/odbc/setup.stub:1.5
--- php4/ext/odbc/setup.stub:1.4 Sun Nov 28 16:45:28 1999
+++ php4/ext/odbc/setup.stub Tue Oct 17 08:23:18 2000
@@ -1,4 +1,4 @@
-# $Id: setup.stub,v 1.4 1999/11/29 00:45:28 ssb Exp $ -*- sh -*-
+# $Id: setup.stub,v 1.5 2000/10/17 15:23:18 kara Exp $ -*- sh -*-
# Solid
define_option with-solid 'Solid support?' yesnodir \
@@ -30,7 +30,8 @@
# 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 @@
# 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 @@
# 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 @@
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 @@
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 @@
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 @@
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
+