summaryrefslogtreecommitdiff
path: root/ext/odbc
diff options
context:
space:
mode:
authorAndreas Karajannis <kara@php.net>1999-08-30 10:48:23 +0000
committerAndreas Karajannis <kara@php.net>1999-08-30 10:48:23 +0000
commit125da02aa766f273176319c09b999fd2f9fca108 (patch)
tree7003b4b6250dfadfce2b6e2156c2025c033b57aa /ext/odbc
parent5600f889b2cb8d2b11b54d711273c40916c4b4fa (diff)
downloadphp-git-125da02aa766f273176319c09b999fd2f9fca108.tar.gz
Add support for unixODBC
Diffstat (limited to 'ext/odbc')
-rw-r--r--ext/odbc/config.h.stub1
-rw-r--r--ext/odbc/config.m426
-rw-r--r--ext/odbc/php3_odbc.h7
-rw-r--r--ext/odbc/setup.stub17
4 files changed, 49 insertions, 2 deletions
diff --git a/ext/odbc/config.h.stub b/ext/odbc/config.h.stub
index 74771af292..09c9a8d5ac 100644
--- a/ext/odbc/config.h.stub
+++ b/ext/odbc/config.h.stub
@@ -1,5 +1,6 @@
#define HAVE_SOLID 0
#define HAVE_IODBC 0
+#define HAVE_UNIXODBC 0
#define HAVE_OPENLINK 0
#define HAVE_ADABAS 0
#define HAVE_CODBC 0
diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4
index bfe05ed052..6113438145 100644
--- a/ext/odbc/config.m4
+++ b/ext/odbc/config.m4
@@ -223,6 +223,32 @@ AC_ARG_WITH(iodbc,
fi
if test -z "$ODBC_TYPE"; then
+AC_MSG_CHECKING(for unixODBC support)
+AC_ARG_WITH(unixODBC,
+[ --with-unixODBC[=DIR] Include unixODBC support. DIR is the unixODBC base
+ install directory, defaults to /usr/local.],
+[
+ if test "$withval" = "yes"; then
+ withval=/usr/local
+ fi
+ if test "$withval" != "no"; then
+ ODBC_INCDIR=$withval/include
+ ODBC_LIBDIR=$withval/lib
+ ODBC_LFLAGS=-L$ODBC_LIBDIR
+ ODBC_INCLUDE=-I$ODBC_INCDIR
+ ODBC_LIBS=-lodbc
+ ODBC_TYPE=unixODBC
+ AC_DEFINE(HAVE_UNIXODBC)
+ 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 OpenLink ODBC support)
AC_ARG_WITH(openlink,
[ --with-openlink[=DIR] Include OpenLink ODBC support. DIR is the
diff --git a/ext/odbc/php3_odbc.h b/ext/odbc/php3_odbc.h
index 647f4de918..1a35df910e 100644
--- a/ext/odbc/php3_odbc.h
+++ b/ext/odbc/php3_odbc.h
@@ -77,6 +77,13 @@ PHP_FUNCTION(solid_fetch_prev);
#define SQL_LEN_DATA_AT_EXEC_OFFSET (-100)
#define SQL_LEN_DATA_AT_EXEC(length) (-(length)+SQL_LEN_DATA_AT_EXEC_OFFSET)
+#elif HAVE_UNIXODBC /* unixODBC library */
+
+#define ODBC_TYPE "unixODBC"
+#include <sql.h>
+#include <sqlext.h>
+#define HAVE_SQL_EXTENDED_FETCH 1
+
#elif HAVE_OPENLINK /* OpenLink ODBC drivers */
#define ODBC_TYPE "Openlink"
diff --git a/ext/odbc/setup.stub b/ext/odbc/setup.stub
index 8f2b2a942c..5257797527 100644
--- a/ext/odbc/setup.stub
+++ b/ext/odbc/setup.stub
@@ -24,8 +24,21 @@ define_option with-iodbc 'iODBC support?' yesnodir \
' Whether to build PHP with iODBC support. This feature was first\n
developed for iODBC Driver Manager, a freely redistributable ODBC\n
driver manager which runs under many flavors of UNIX.\n
- More info about iODBC can be found on the FreeODBC Pages at \n
- http://users.ids.net/~bjepson/freeODBC/.'
+ More info about iODBC can be found on the iODBC page at \n
+ http://www.iodbc.org'
+fi
+
+# unixODBC
+if test "$option_value_with_solid" = "no" -a \
+ "$option_value_with_empress" = "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
+ developed for unixODBC Driver Manager, a freely redistributable ODBC\n
+ driver manager which runs under many flavors of UNIX and conforms to\n
+ the ODBC 3.5 specification.\n
+ More info about unixODBC can be found on the unixODBC home page at \n
+ http://www.unixodbc.org'
fi
# OpenLink