AC_MSG_RESULT(`echo $ODBC_LIBS | sed -e 's!.*/!!'`)
])
+dnl
+dnl Figure out the path where the newest DBMaker is installed.
+dnl
+AC_DEFUN(AC_FIND_DBMAKER_PATH,[
+ AC_MSG_CHECKING([DBMaker version])
+ if [ test -d "$1/4.0" ]; then
+ DBMAKER_PATH=$1/4.0
+ elif [ test -d "$1/3.6" ]; then
+ DBMAKER_PATH=$1/3.6
+ elif [ test -d "$1/3.5" ]; then
+ DBMAKER_PATH=$1/3.5
+ elif [ test -d "$1/3.01" ]; then
+ DBMAKER_PATH=$1/3.01
+ elif [ test -d "$1/3.0" ]; then
+ DBMAKER_PATH=$1/3.0
+ else
+ DBMAKER_PATH=$1
+ fi
+ AC_MSG_RESULT(`echo $DBMAKER_PATH | sed -e 's!.*/!!'`)
+])
+
if test -z "$ODBC_TYPE"; then
AC_MSG_CHECKING(for Adabas support)
AC_ARG_WITH(adabas,
])
fi
+if test -z "$ODBC_TYPE"; then
+AC_MSG_CHECKING(for DBMaker support)
+AC_ARG_WITH(dbmaker,
+[ --with-dbmaker[=DIR] Include DBMaker support. DIR is the DBMaker base
+ install directory, defaults to where the latest
+ version of DBMaker is installed (such as
+ /home/dbmaker/3.6).
+],
+[
+ if test "$withval" = "yes"; then
+ # find dbmaker's home directory
+ DBMAKER_HOME=`grep "^dbmaker:" /etc/passwd | awk -F: '{print $6}'`
+ AC_FIND_DBMAKER_PATH($DBMAKER_HOME)
+ withval=$DBMAKER_PATH
+ fi
+ if test "$withval" != "no"; then
+ ODBC_INCDIR=$withval/include
+ ODBC_LIBDIR=$withval/lib
+ ODBC_INCLUDE=-I$ODBC_INCDIR
+ ODBC_LFLAGS=-L$ODBC_LIBDIR
+ ODBC_INCLUDE=-I$ODBC_INCDIR
+ ODBC_LIBS="-ldmapic -lc"
+ ODBC_TYPE=dbmaker
+ AC_DEFINE(HAVE_DBMAKER)
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
+],[
+ AC_MSG_RESULT(no)
+])
+fi
+
if test -n "$ODBC_TYPE"; then
INCLUDES="$INCLUDES $ODBC_INCLUDE"
EXTRA_LIBS="$EXTRA_LIBS $ODBC_LFLAGS $ODBC_LIBS"
PHP_FE(odbc_define, NULL)*/
PHP_FE(odbc_tables, NULL)
PHP_FE(odbc_columns, NULL)
+#ifndef HAVE_DBMAKER /* not supported now */
PHP_FE(odbc_columnprivileges, NULL)
+#endif
PHP_FE(odbc_foreignkeys, NULL)
PHP_FE(odbc_gettypeinfo, NULL)
PHP_FE(odbc_primarykeys, NULL)
PHP_FE(odbc_procedures, NULL)
PHP_FE(odbc_specialcolumns, NULL)
PHP_FE(odbc_statistics, NULL)
+#ifndef HAVE_DBMAKER /* not supported now */
PHP_FE(odbc_tableprivileges, NULL)
+#endif
PHP_FALIAS(odbc_do, odbc_exec, NULL)
{ NULL, NULL, NULL }
};
}
ZEND_FETCH_RESOURCE2(conn, odbc_connection *, pv_conn, -1, "ODBC-Link", le_conn, le_pconn);
-
+
+#ifndef HAVE_DBMAKER
if ((*pv_onoff)) {
+#else
+ if (pv_onoff && (*pv_onoff)) {
+#endif
convert_to_long_ex(pv_onoff);
rc = SQLSetConnectOption(conn->hdbc, SQL_AUTOCOMMIT,
((*pv_onoff)->value.lval) ?
}
/* }}} */
+#ifndef HAVE_DBMAKER
/* {{{ proto int odbc_columnprivileges(int connection_id, string catalog, string schema, string table, string column )
call the SQLColumnPrivileges function */
PHP_FUNCTION(odbc_columnprivileges)
ZEND_REGISTER_RESOURCE(return_value, result, le_result);
}
/* }}} */
+#endif /* HAVE_DBMAKER */
/* {{{ proto int odbc_foreignkeys(int connection_id, string pk_catalog, string pk_schema, string pk_table, string fk_catalog, string fk_schema, string fk_table )
call the SQLForeignKeys function */
fschema = (*pv_fschema)->value.str.val;
convert_to_string_ex(pv_ftable);
ftable = (*pv_ftable)->value.str.val;
+#ifdef HAVE_DBMAKER
+#define EMPTY_TO_NULL(xstr) \
+ if ((int)strlen((xstr)) == 0) (xstr) = NULL
+
+ EMPTY_TO_NULL(pcat);
+ EMPTY_TO_NULL(pschema);
+ EMPTY_TO_NULL(ptable);
+ EMPTY_TO_NULL(fcat);
+ EMPTY_TO_NULL(fschema);
+ EMPTY_TO_NULL(ftable);
+#endif
} else {
WRONG_PARAM_COUNT;
}
WRONG_PARAM_COUNT;
}
convert_to_long_ex(pv_type);
- type = (SQLUSMALLINT) (*pv_cat)->value.lval;
+ type = (SQLUSMALLINT) (*pv_type)->value.lval;
convert_to_string_ex(pv_cat);
cat = (*pv_cat)->value.str.val;
convert_to_string_ex(pv_schema);
}
/* }}} */
+#ifndef HAVE_DBMAKER
/* {{{ proto int odbc_tableprivilegess(int connection_id, string catalog, string schema, string table )
call the SQLTablePrivilegess function */
PHP_FUNCTION(odbc_tableprivileges)
ZEND_REGISTER_RESOURCE(return_value, result, le_result);
}
/* }}} */
+#endif /* HAVE_DBMAKER */
#endif /* HAVE_UODBC */
More information about Velocis can be found at http://www.raima.com/.'
fi
-# Custom ODBC
+# DBMaker
if test "$option_value_with_solid" = "no" -a \
"$option_value_with_empress" = "no" -a \
"$option_value_with_iodbc" = "no" -a \
"$option_value_with_openlink" = "no" -a \
"$option_value_with_adabas" = "no" -a \
"$option_value_with_velocis" = "no"; then
+define_option with-dbmaker 'DBMaker support?' yesnodir \
+ 'no /home/dbmaker DBMaker install' \
+' Whether to build PHP with DBMaker support. \n
+ More information about DBMaker can be found at http://www.casemaker.com/.'
+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_openlink" = "no" -a \
+ "$option_value_with_adabas" = "no" -a \
+ "$option_value_with_velocis" = "no"; -a \
+ "$option_value_with_dbmaker" = "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